Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2018-11-08 09:41:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hwinfo (Old) and /work/SRC/openSUSE:Factory/.hwinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hwinfo" Thu Nov 8 09:41:56 2018 rev:164 rq:645306 version:21.61 Changes: -------- --- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes 2018-10-02 19:41:19.250218613 +0200 +++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes 2018-11-08 09:41:59.797555422 +0100 @@ -1,0 +2,23 @@ +Mon Oct 29 14:56:09 UTC 2018 - snw...@suse.de + +- merge gh#openSUSE/hwinfo#72 +- fix id of s-par storage controller (bsc#1107196) +- 21.61 + +-------------------------------------------------------------------- +Wed Oct 17 13:23:47 UTC 2018 - snw...@suse.de + +- merge gh#openSUSE/hwinfo#71 +- add network interfaces found on mdio bus (bsc#1018271) +- 21.60 + +-------------------------------------------------------------------- +Fri Oct 12 08:46:53 UTC 2018 - snw...@suse.de + +- merge gh#openSUSE/hwinfo#70 +- The location of the S-Par drivers virtual buses has changed + (bsc#1107196) +- The location of the S-Par drivers virtual buses has changed +- 21.59 + +-------------------------------------------------------------------- Old: ---- hwinfo-21.58.tar.xz New: ---- hwinfo-21.61.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.vS84AM/_old 2018-11-08 09:42:00.277554865 +0100 +++ /var/tmp/diff_new_pack.vS84AM/_new 2018-11-08 09:42:00.277554865 +0100 @@ -36,7 +36,7 @@ License: GPL-2.0+ Group: Hardware/Other Url: http://gitorious.org/opensuse/hwinfo -Version: 21.58 +Version: 21.61 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ hwinfo-21.58.tar.xz -> hwinfo-21.61.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.58/VERSION new/hwinfo-21.61/VERSION --- old/hwinfo-21.58/VERSION 2018-09-27 14:37:03.000000000 +0200 +++ new/hwinfo-21.61/VERSION 2018-10-29 15:56:09.000000000 +0100 @@ -1 +1 @@ -21.58 +21.61 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.58/changelog new/hwinfo-21.61/changelog --- old/hwinfo-21.58/changelog 2018-09-27 14:37:03.000000000 +0200 +++ new/hwinfo-21.61/changelog 2018-10-29 15:56:09.000000000 +0100 @@ -1,3 +1,12 @@ +2018-10-29: 21.61 + - fix id of s-par storage controller (bsc #1107196) + +2018-10-17: 21.60 + - add network interfaces found on mdio bus (bsc #1018271) + +2018-10-08: 21.59 + - The location of the S-Par drivers virtual buses has changed (bsc #1107196) + 2018-03-29: 21.58 - ensure udev device links are unique (bsc #1084700) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.58/src/hd/hd.h new/hwinfo-21.61/src/hd/hd.h --- old/hwinfo-21.58/src/hd/hd.h 2018-09-27 14:37:03.000000000 +0200 +++ new/hwinfo-21.61/src/hd/hd.h 2018-10-29 15:56:09.000000000 +0100 @@ -20,7 +20,7 @@ /** Interface version */ #define HD_VERSION 21 -#define HD_MINOR_VERSION 58 +#define HD_MINOR_VERSION 61 #define HD_FULL_VERSION (HD_VERSION * 1000 + HD_MINOR_VERSION) /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.58/src/hd/pci.c new/hwinfo-21.61/src/hd/pci.c --- old/hwinfo-21.58/src/hd/pci.c 2018-09-27 14:37:03.000000000 +0200 +++ new/hwinfo-21.61/src/hd/pci.c 2018-10-29 15:56:09.000000000 +0100 @@ -64,6 +64,8 @@ static void hd_read_mmc(hd_data_t *hd_data); static void hd_read_sdio(hd_data_t *hd_data); static void hd_read_nd(hd_data_t *hd_data); +static void hd_read_visorbus(hd_data_t *hd_data); +static void hd_read_mdio(hd_data_t *hd_data); void hd_scan_sysfs_pci(hd_data_t *hd_data) { @@ -124,6 +126,12 @@ PROGRESS(15, 0, "nd"); hd_read_nd(hd_data); + + PROGRESS(16, 0, "visorbus"); + hd_read_visorbus(hd_data); + + PROGRESS(17, 0, "mdio"); + hd_read_mdio(hd_data); } @@ -2061,5 +2069,129 @@ free_str_list(sf_bus); } -/** @} */ +/* + * visorbus + */ +void hd_read_visorbus(hd_data_t *hd_data) +{ + uint64_t ul0; + hd_t *hd; + str_list_t *sf_bus, *sf_bus_e; + char *sf_dev, *drv, *drv_name; + + sf_bus = read_dir("/sys/bus/visorbus/devices", 'l'); + + if(!sf_bus) { + ADD2LOG("sysfs: no such bus: visorbus\n"); + return; + } + + for(sf_bus_e = sf_bus; sf_bus_e; sf_bus_e = sf_bus_e->next) { + sf_dev = new_str(hd_read_sysfs_link("/sys/bus/visorbus/devices", sf_bus_e->str)); + + ADD2LOG( + " visorbus device: name = %s\n path = %s\n", + sf_bus_e->str, + hd_sysfs_id(sf_dev) + ); + + hd = add_hd_entry(hd_data, __LINE__, 0); + hd->vendor.id = MAKE_ID(TAG_PCI, 0xA0F1); /* Unisys */ + + drv_name = NULL; + drv = new_str(hd_read_sysfs_link(sf_dev, "driver")); + if(drv) { + drv_name = strrchr(drv, '/'); + if(drv_name) { + drv_name++; + ADD2LOG(" driver = \"%s\"\n", drv_name); + + if(!strcmp(drv_name,"visornic")) { + hd->device.id = MAKE_ID(TAG_SPECIAL, 0x0002); + hd->base_class.id = bc_network; + } + else if(!strcmp(drv_name,"visorhba")) { + hd->device.id = MAKE_ID(TAG_SPECIAL, 0x0003); + hd->base_class.id = bc_storage; + } + else { + hd->device.id = MAKE_ID(TAG_SPECIAL, 0x0000); + hd->base_class.id = bc_other; + } + } + } + else { + hd->device.id = MAKE_ID(TAG_SPECIAL, 0x0001); + hd->base_class.id = bc_bridge; + } + + if(hd_attr_uint(get_sysfs_attr_by_path(sf_dev, "device"), &ul0, 0)) { + hd->device.id = MAKE_ID(TAG_SPECIAL, ul0 ); + ADD2LOG(" device = %lu\n", ul0); + } + + hd->sysfs_id = new_str(hd_sysfs_id(sf_dev)); + hd->sysfs_bus_id = new_str(sf_bus_e->str); + if(drv_name) add_str_list(&hd->drivers, drv_name); + + free_mem(sf_dev); + free_mem(drv); + } + + free_str_list(sf_bus); +} + + +/* + * Get mdio data from sysfs. + */ +void hd_read_mdio(hd_data_t *hd_data) +{ + str_list_t *sf_bus, *sf_bus_e, *sf_eth_dev = NULL, *net_if; + char *s, *sf_dev, *sf_eth_net; + hd_t *hd; + + sf_bus = read_dir("/sys/bus/mdio_bus/devices", 'l'); + + if(!sf_bus) { + ADD2LOG("sysfs: no such bus: mdio\n"); + return; + } + + for(sf_bus_e = sf_bus; sf_bus_e; sf_bus_e = sf_bus_e->next) { + sf_dev = new_str(hd_read_sysfs_link("/sys/bus/mdio_bus/devices", sf_bus_e->str)); + + ADD2LOG( + " mdio device: name = %s\n path = %s\n", + sf_bus_e->str, + hd_sysfs_id(sf_dev) + ); + + sf_eth_net = new_str(hd_read_sysfs_link(sf_dev, "net")); + sf_eth_dev = read_dir(sf_eth_net, 'd'); + + for(net_if = sf_eth_dev; net_if; net_if = net_if->next) { + ADD2LOG(" mdio net: sf_eth_net = %s, if = %s\n", sf_eth_net, net_if->str); + + 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, "Ethernet controller"); + hd->sysfs_id = new_str(hd_sysfs_id(sf_dev)); + hd->sysfs_bus_id = new_str(sf_bus_e->str); + hd->unix_dev_name = new_str(net_if->str); + s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1); + if(s) add_str_list(&hd->drivers, s); + } + + free_mem(sf_eth_net); + free_str_list(sf_eth_dev); + + free_mem(sf_dev); + } + + free_str_list(sf_bus); +} + +/** @} */