Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2018-06-15 14:33:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hwinfo (Old)
 and      /work/SRC/openSUSE:Factory/.hwinfo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hwinfo"

Fri Jun 15 14:33:56 2018 rev:160 rq:615244 version:21.55

Changes:
--------
--- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes    2018-04-26 
13:33:17.698494132 +0200
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2018-06-15 
14:33:58.251346688 +0200
@@ -1,0 +2,15 @@
+Fri Jun 8 12:54:19 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/hwinfo#64
+- try a more agressive way to catch all usb platform controllers
+  (bsc#1072450)
+- 21.55
+
+--------------------------------------------------------------------
+Wed Jun 6 13:28:02 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/hwinfo#63
+- detect ARM HISILICON SAS controller (bsc#1072450)
+- 21.54
+
+--------------------------------------------------------------------

Old:
----
  hwinfo-21.53.tar.xz

New:
----
  hwinfo-21.55.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.Hu1uE4/_old  2018-06-15 14:33:59.823289191 +0200
+++ /var/tmp/diff_new_pack.Hu1uE4/_new  2018-06-15 14:33:59.827289045 +0200
@@ -36,7 +36,7 @@
 License:        GPL-2.0+
 Group:          Hardware/Other
 Url:            http://gitorious.org/opensuse/hwinfo
-Version:        21.53
+Version:        21.55
 Release:        0
 Source:         %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ hwinfo-21.53.tar.xz -> hwinfo-21.55.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.53/VERSION new/hwinfo-21.55/VERSION
--- old/hwinfo-21.53/VERSION    2018-04-20 11:55:58.000000000 +0200
+++ new/hwinfo-21.55/VERSION    2018-06-08 14:54:19.000000000 +0200
@@ -1 +1 @@
-21.53
+21.55
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.53/changelog new/hwinfo-21.55/changelog
--- old/hwinfo-21.53/changelog  2018-04-20 11:55:58.000000000 +0200
+++ new/hwinfo-21.55/changelog  2018-06-08 14:54:19.000000000 +0200
@@ -1,3 +1,9 @@
+2018-06-08:    21.55
+       - try a more agressive way to catch all usb platform controllers (bsc 
#1072450)
+
+2018-06-06:    21.54
+       - detect ARM HISILICON SAS controller (bsc #1072450)
+
 2018-04-11:    21.53
        - add xhci interface constant
        - detect usb controller in ARM platform device (bsc #1072450)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.53/src/hd/hd.h new/hwinfo-21.55/src/hd/hd.h
--- old/hwinfo-21.53/src/hd/hd.h        2018-04-20 11:55:58.000000000 +0200
+++ new/hwinfo-21.55/src/hd/hd.h        2018-06-08 14:54:19.000000000 +0200
@@ -20,7 +20,7 @@
 
 /** Interface version */
 #define HD_VERSION     21
-#define HD_MINOR_VERSION       53
+#define HD_MINOR_VERSION       55
 #define HD_FULL_VERSION                (HD_VERSION * 1000 + HD_MINOR_VERSION)
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.53/src/hd/pci.c 
new/hwinfo-21.55/src/hd/pci.c
--- old/hwinfo-21.53/src/hd/pci.c       2018-04-20 11:55:58.000000000 +0200
+++ new/hwinfo-21.55/src/hd/pci.c       2018-06-08 14:54:19.000000000 +0200
@@ -930,11 +930,11 @@
  */
 void hd_read_platform(hd_data_t *hd_data)
 {
-  char *s, *platform_type, *device_type = NULL;
+  char *s, *platform_type, *device_type, *driver;
   str_list_t *sf_bus, *sf_bus_e, *sf_eth_dev = NULL;
   char *sf_dev, *sf_eth_net;
   int mv643xx_eth_seen = 0;
-  int is_net, is_storage, is_usb, is_xhci;
+  int is_net, is_storage, is_usb, is_xhci, is_ehci;
   hd_t *hd;
 
   sf_bus = read_dir("/sys/bus/platform/devices", 'l');
@@ -955,27 +955,46 @@
 
     if((s = get_sysfs_attr_by_path(sf_dev, "modalias"))) {
       platform_type = canon_str(s, strlen(s));
-      device_type = free_mem(device_type);
+      device_type = new_str("");
       if((s = get_sysfs_attr_by_path(sf_dev, "uevent"))) {
         char *t, *t2;
         if((t = strstr(s, "OF_NAME="))) {
           t += sizeof "OF_NAME=" - 1;
           if((t2 = strchr(t, '\n'))) *t2 = 0;
-          device_type = strdup(t);
+          free_mem(device_type);
+          device_type = new_str(t);
         }
       }
-      ADD2LOG("    type = \"%s\", modalias = \"%s\"\n", device_type, 
platform_type);
+      // 'driver' is a static reference, don't free
+      driver = hd_sysfs_find_driver(hd_data, hd_sysfs_id(sf_dev), 1);
+      if(!driver) driver = "";
+      ADD2LOG("    type = \"%s\", modalias = \"%s\", driver = \"%s\"\n", 
device_type, platform_type, driver);
       is_net = 0;
       sf_eth_net = new_str(hd_read_sysfs_link(sf_dev, "net"));
       sf_eth_dev = read_dir(sf_eth_net, 'd');
       is_net = sf_eth_net && sf_eth_dev;
-      is_storage = device_type && !strcmp(device_type, "sata");
-      is_usb = device_type && (!strcmp(device_type, "usb") || 
!strcmp(device_type, "dwusb"));
-      is_xhci = platform_type && strstr(platform_type, ":xhci-hcd");
+      is_storage =
+        !strcmp(device_type, "sata") ||
+        !strcmp(platform_type, "acpi:HISI0161:") ||
+        !strcmp(platform_type, "acpi:HISI0162:");
+      is_usb = (
+        !strcmp(device_type, "usb") ||
+        !strcmp(device_type, "dwusb") ||
+        strstr(platform_type, ":xhci-hcd") ||
+        !strcmp(driver, "ohci-platform") ||
+        !strcmp(driver, "ehci-platform") ||
+        !strcmp(driver, "xhci-plat-hcd")
+      );
+      is_xhci = (
+        strstr(platform_type, "xhci-") ||
+        strstr(driver, "xhci-")
+      );
+      is_ehci = !!strstr(driver, "ehci-");
       if(is_net) ADD2LOG("    is net: sf_eth_net = %s\n", sf_eth_net);
       if(is_storage) ADD2LOG("    is storage\n");
       if(is_usb) ADD2LOG("    is usb\n");
       if(is_xhci) ADD2LOG("    is xhci\n");
+      if(is_ehci) ADD2LOG("    is ehci\n");
       free_mem(sf_eth_net);
       free_str_list(sf_eth_dev);
       if(
@@ -990,7 +1009,7 @@
         hd = add_hd_entry(hd_data, __LINE__, 0);
         hd->base_class.id = bc_network;
         hd->sub_class.id = 0;
-        str_printf(&hd->device.name, 0, "ARM Ethernet %d", hd->slot);
+        str_printf(&hd->device.name, 0, "ARM Ethernet controller");
         hd->modalias = new_str(platform_type);
         hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
         hd->sysfs_bus_id = new_str(sf_bus_e->str);
@@ -1000,25 +1019,36 @@
       else if(is_storage) {
         hd = add_hd_entry(hd_data, __LINE__, 0);
         hd->base_class.id = bc_storage;
-        hd->sub_class.id = sc_sto_ide;
-        str_printf(&hd->device.name, 0, "ARM SATA %d", hd->slot);
+        if(!strcmp(device_type, "sata")) {
+          str_printf(&hd->device.name, 0, "ARM SATA controller");
+          hd->sub_class.id = sc_sto_ide;
+        }
+        else if(!strcmp(platform_type, "acpi:HISI0162:") || 
!strcmp(platform_type, "acpi:HISI0161:")) {
+          str_printf(&hd->device.name, 0, "HISILICON SAS controller");
+          hd->sub_class.id = sc_sto_scsi;
+        }
+        else {
+          str_printf(&hd->device.name, 0, "Storage controller");
+          hd->sub_class.id = sc_sto_other;
+        }
         hd->modalias = new_str(platform_type);
         hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
         hd->sysfs_bus_id = new_str(sf_bus_e->str);
         s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
         if(s) add_str_list(&hd->drivers, s);
       }
-      else if(is_usb || is_xhci) {
+      else if(is_usb) {
         hd = add_hd_entry(hd_data, __LINE__, 0);
         hd->base_class.id = bc_serial;
         hd->sub_class.id = sc_ser_usb;
 
         if(is_xhci) {
           hd->prog_if.id = pif_usb_xhci;
-          str_printf(&hd->device.name, 0, "ARM USB XHCI Controller");
+          str_printf(&hd->device.name, 0, "ARM USB XHCI controller");
         }
         else {
-          str_printf(&hd->device.name, 0, "ARM USB %d", hd->slot);
+          if(is_ehci) hd->prog_if.id = pif_usb_ehci;
+          str_printf(&hd->device.name, 0, "ARM USB controller");
         }
         hd->modalias = new_str(platform_type);
         hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
@@ -1026,6 +1056,7 @@
         s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
         if(s) add_str_list(&hd->drivers, s);
       }
+      free_mem(device_type);
       free_mem(platform_type);
     }
 


Reply via email to