Bugzilla – Attachment 202572 Details for
Bug 370850
new hwinfo ps3 network code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
hwinfo.new-ps3-network-code.patch
hwinfo.new-ps3-network-code.patch (text/plain), 2.79 KB, created by
Stefan Assmann
on 2008-03-17 14:37:21 UTC
(
hide
)
Description:
hwinfo.new-ps3-network-code.patch
Filename:
MIME Type:
Creator:
Stefan Assmann
Created:
2008-03-17 14:37:21 UTC
Size:
2.79 KB
patch
obsolete
>--- > src/hd/pci.c | 49 +++++++++++++++++++++++++++++++------------------ > 1 file changed, 31 insertions(+), 18 deletions(-) > >--- a/src/hd/pci.c >+++ b/src/hd/pci.c >@@ -934,8 +934,8 @@ void hd_read_ps3_system_bus(hd_data_t *h > char *s, *ps3_name; > int scsi_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')); > >@@ -960,23 +960,36 @@ void hd_read_ps3_system_bus(hd_data_t *h > ADD2LOG(" modalias = \"%s\"\n", ps3_name); > } > >+ /* network devices */ > 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); >- >- 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); >+ /* 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->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); >+ >+ /* ethernet and wireless differ only by directory "wireless" so check for it */ >+ sf_eth_wireless = new_str(hd_read_sysfs_link(sf_eth_net, sf_eth_dev_e->str)); >+ sf_eth_wireless = new_str(hd_read_sysfs_link(sf_eth_wireless, "wireless")); >+ if (sf_eth_wireless) { >+ hd->sub_class.id = 0x82; /* wireless */ >+ //hd->unix_dev_name = new_str(sf_eth_dev_e->str); /* this is ugly yes */ >+ str_printf(&hd->device.name, 0, "PS3 Wireless card %d", hd->slot); >+ } else { >+ hd->sub_class.id = 0; /* ethernet */ >+ str_printf(&hd->device.name, 0, "PS3 Ethernet card %d", hd->slot); >+ } >+ s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1); >+ if(s) add_str_list(&hd->drivers, s); >+ } > } > > if ( ps3_name && !strcmp(ps3_name, "ps3:7")) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 370850
:
201650
|
202521
| 202572 |
202610