Hello community, here is the log from the commit of package hwinfo checked in at Wed Mar 19 01:32:53 CET 2008. -------- --- hwinfo/hwinfo.changes 2008-03-14 14:32:11.000000000 +0100 +++ /mounts/work_src_done/STABLE/hwinfo/hwinfo.changes 2008-03-17 17:56:53.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Mar 17 17:56:46 CET 2008 - snwint@suse.de + +- fix mv643xx detection (bnc #359867) +- updated ps3 network card detection (bnc #370850) + +------------------------------------------------------------------- Old: ---- hwinfo-14.8.tar.bz2 New: ---- hwinfo-14.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.k24495/_old 2008-03-19 01:32:38.000000000 +0100 +++ /var/tmp/diff_new_pack.k24495/_new 2008-03-19 01:32:38.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package hwinfo (Version 14.8) +# spec file for package hwinfo (Version 14.9) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -21,9 +21,9 @@ PreReq: /sbin/ldconfig %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Hardware Library -Version: 14.8 +Version: 14.9 Release: 1 -Source: hwinfo-14.8.tar.bz2 +Source: hwinfo-14.9.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -94,6 +94,9 @@ %doc doc/libhd/html %changelog +* Mon Mar 17 2008 snwint@suse.de +- fix mv643xx detection (bnc #359867) +- updated ps3 network card detection (bnc #370850) * Fri Mar 14 2008 snwint@suse.de - wlan detection sometimes missed network cards (bnc #368442) - ide-cd module name changed ++++++ hwinfo-14.8.tar.bz2 -> hwinfo-14.9.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/Changelog new/hwinfo-14.9/Changelog --- old/hwinfo-14.8/Changelog 2008-03-12 13:57:02.000000000 +0100 +++ new/hwinfo-14.9/Changelog 2008-03-17 17:56:13.000000000 +0100 @@ -1,3 +1,7 @@ +17/3/2008: v14.9 + - fix mv643xx detection (bnc #359867) + - updated ps3 network card detection (bnc #370850) + 11/3/2008: v14.8 - ide-cd module name changed - make hwprobe=+udev work again diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/src/hd/hd.c new/hwinfo-14.9/src/hd/hd.c --- old/hwinfo-14.8/src/hd/hd.c 2008-02-29 18:12:04.000000000 +0100 +++ new/hwinfo-14.9/src/hd/hd.c 2008-03-17 16:38:24.000000000 +0100 @@ -5754,6 +5754,30 @@ } +hd_t *hd_find_sysfs_id_devname(hd_data_t *hd_data, char *id, char *devname) +{ + hd_t *hd; + + if(id && *id && devname) { + for(hd = hd_data->hd; hd; hd = hd->next) { + if( + hd->sysfs_id && + !strcmp(hd->sysfs_id, id) && + ( + !hd->unix_dev_name || + ( + hd->unix_dev_name && + !strcmp(hd->unix_dev_name, devname) + ) + ) + ) return hd; + } + } + + return NULL; +} + + hd_sysfsdrv_t *hd_free_sysfsdrv(hd_sysfsdrv_t *sf) { hd_sysfsdrv_t *next; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/src/hd/hd_int.h new/hwinfo-14.9/src/hd/hd_int.h --- old/hwinfo-14.8/src/hd/hd_int.h 2007-08-23 11:38:45.000000000 +0200 +++ new/hwinfo-14.9/src/hd/hd_int.h 2008-03-17 16:04:54.000000000 +0100 @@ -209,6 +209,7 @@ void read_udevinfo(hd_data_t *hd_data); hd_t *hd_find_sysfs_id(hd_data_t *hd_data, char *id); +hd_t *hd_find_sysfs_id_devname(hd_data_t *hd_data, char *id, char *devname); int hd_attr_uint(char* attr, uint64_t* u, int base); str_list_t *hd_attr_list(char *str); char *hd_sysfs_id(char *path); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/src/hd/net.c new/hwinfo-14.9/src/hd/net.c --- old/hwinfo-14.8/src/hd/net.c 2008-03-05 12:28:36.000000000 +0100 +++ new/hwinfo-14.9/src/hd/net.c 2008-03-17 16:41:07.000000000 +0100 @@ -258,6 +258,16 @@ hd_card = hd_find_sysfs_id(hd_data, s); } } + + /* if one card has several interfaces (as with PS3), check interface names, too */ + if( + hd->unix_dev_name && + hd_card->unix_dev_name && + strcmp(hd->unix_dev_name, hd_card->unix_dev_name) + ) { + hd_card = hd_find_sysfs_id_devname(hd_data, s, hd->unix_dev_name); + } + s = free_mem(s); if(hd_card) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/src/hd/pci.c new/hwinfo-14.9/src/hd/pci.c --- old/hwinfo-14.8/src/hd/pci.c 2008-03-12 13:55:31.000000000 +0100 +++ new/hwinfo-14.9/src/hd/pci.c 2008-03-17 17:54:01.000000000 +0100 @@ -816,7 +816,7 @@ platform_type = canon_str(s, strlen(s)); ADD2LOG(" type = \"%s\"\n", platform_type); if( - !strcmp(platform_type, "mv643xx_eth") && + strcmp(platform_type, "mv643xx_eth") && !mv643xx_eth_seen++ ) { add_mv643xx_eth(hd_data, platform_type); @@ -933,10 +933,10 @@ void hd_read_ps3_system_bus(hd_data_t *hd_data) { char *s, *ps3_name; - int scsi_cnt = 0; + int scsi_cnt = 0, eth_cnt = 0, wlan_cnt = 0; hd_t *hd; - str_list_t *sf_bus, *sf_bus_e; - char *sf_dev; + str_list_t *sf_bus, *sf_bus_e, *sf_eth_dev, *sf_eth_dev_e; + char *sf_dev, *sf_eth_net, *sf_eth_wireless; sf_bus = reverse_str_list(read_dir("/sys/bus/ps3_system_bus/devices", 'l')); @@ -961,23 +961,41 @@ ADD2LOG(" modalias = \"%s\"\n", ps3_name); } - if( ps3_name && !strcmp(ps3_name, "ps3:3")) { - hd = add_hd_entry(hd_data, __LINE__, 0); - hd->bus.id = bus_ps3_system_bus; - - hd->vendor.id = MAKE_ID(TAG_PCI, 0x104d); /* Sony */ - - hd->base_class.id = bc_network; - hd->sub_class.id = 0; /* ethernet */ - hd->device.id = MAKE_ID(TAG_SPECIAL, 0x1003); /* PS3_DEV_TYPE_SB_GELIC */ - str_printf(&hd->device.name, 0, "PS3 Ethernet card %d", hd->slot); - - hd->modalias = new_str(ps3_name); + /* network devices */ + if(ps3_name && !strcmp(ps3_name, "ps3:3")) { + /* read list of available devices */ + sf_eth_net = new_str(hd_read_sysfs_link(sf_dev, "net")); + sf_eth_dev = read_dir(sf_eth_net, 'd'); + + /* add entries for available devices */ + for(sf_eth_dev_e = sf_eth_dev; sf_eth_dev_e; sf_eth_dev_e = sf_eth_dev_e->next) { + hd = add_hd_entry(hd_data, __LINE__, 0); + hd->bus.id = bus_ps3_system_bus; + hd->sysfs_bus_id = new_str(sf_bus_e->str); + hd->slot = eth_cnt + wlan_cnt; + hd->vendor.id = MAKE_ID(TAG_PCI, 0x104d); /* Sony */ + hd->device.id = MAKE_ID(TAG_SPECIAL, 0x1003); /* PS3_DEV_TYPE_SB_GELIC */ + hd->base_class.id = bc_network; + hd->sysfs_id = new_str(hd_sysfs_id(sf_dev)); + hd->modalias = new_str(ps3_name); + hd->unix_dev_name = new_str(sf_eth_dev_e->str); /* this is needed to correctly link to interfaces later */ + + /* ethernet and wireless differ only by directory "wireless" so check for it */ + sf_eth_wireless = hd_read_sysfs_link(hd_read_sysfs_link(sf_eth_net, sf_eth_dev_e->str), "wireless"); + if(sf_eth_wireless) { + hd->sub_class.id = 0x82; /* wireless */ + str_printf(&hd->device.name, 0, "PS3 Wireless card %d", wlan_cnt++); + } + else { + hd->sub_class.id = 0; /* ethernet */ + str_printf(&hd->device.name, 0, "PS3 Ethernet card %d", eth_cnt++); + } + s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1); + if(s) add_str_list(&hd->drivers, s); + } - 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); + sf_eth_net = free_mem(sf_eth_net); + sf_eth_dev = free_str_list(sf_eth_dev); } if ( ps3_name && !strcmp(ps3_name, "ps3:7")) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/src/ids/src/bus new/hwinfo-14.9/src/ids/src/bus --- old/hwinfo-14.8/src/ids/src/bus 2004-08-04 15:26:04.000000000 +0200 +++ new/hwinfo-14.9/src/ids/src/bus 2008-03-17 16:23:01.000000000 +0100 @@ -75,3 +75,7 @@ bus.id 0x8d +bus.name IUCV + + bus.id 0x8e ++bus.name PS3 + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-14.8/VERSION new/hwinfo-14.9/VERSION --- old/hwinfo-14.8/VERSION 2008-03-14 14:31:50.000000000 +0100 +++ new/hwinfo-14.9/VERSION 2008-03-17 17:54:23.000000000 +0100 @@ -1 +1 @@ -14.8 +14.9 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org