I will resubmit. -steve >-----Original Message----- >From: Love, Robert W >Sent: Wednesday, May 06, 2009 3:55 PM >To: Ma, Steve >Cc: [email protected] >Subject: Re: [Open-FCoE] [RESUBMIT PATCH] libhbalinux: Reading device_id, >etc. from sysfs instead of libpciaccess > >On Wed, 2009-04-22 at 09:21 -0700, Steve Ma wrote: >> The vendor_id, device_id, subsystem_vendor_id, subsystem_device_id, >> and device_class can be either obtained from libpciaccess and sysfs >> for networking HBA. We need only to read these information from >> the sysfs, and remove code for getting these information from pci. >> --- >> >Steve, I can't apply this patch. Can you please resubmit the change >against the current libhbalinux repository? I believe that this patch >was dependent on other patches that were either rejected or required >changes. The "#if 0" code leads me to that conclusion, but I am not >sure. > >Also, please add your Signed-off line to your patches. I added it to >your other patch that I just committed to libhbalinux. > >> lport.c | 4 +--- >> pci.c | 10 +--------- >> 2 files changed, 2 insertions(+), 12 deletions(-) >> >> diff --git a/lport.c b/lport.c >> index 8c1beb7..99629f9 100644 >> --- a/lport.c >> +++ b/lport.c >> @@ -181,7 +181,7 @@ sysfs_scan(struct dirent *dp, void *arg) >> goto skip; >> buf[i] = '\0'; >> >> - if (strstr(buf, "devices/pci")) { >> + if (strstr(buf, "devices/pci") && !strstr(buf, "/net/")) { >> snprintf(hba_dir, sizeof(hba_dir), "%s/device/..", host_dir); >> } else { >> /* assume a net device */ >> @@ -316,7 +316,6 @@ sysfs_scan(struct dirent *dp, void *arg) >> snprintf(buf, sizeof(buf), "fcoe:%s", ifname); >> ap->ad_name = strdup(buf); >> >> -#if 0 >> /* Get vendor_id */ >> rc = sa_sys_read_u32(hba_dir, "vendor", &hba_info.vendor_id); >> >> @@ -334,7 +333,6 @@ sysfs_scan(struct dirent *dp, void *arg) >> /* Get device_class */ >> rc = sa_sys_read_u32(hba_dir, "class", &hba_info.device_class); >> hba_info.device_class = hba_info.device_class>>8; >> -#endif >> >> /* >> * Get Hardware Information via PCI Library >> diff --git a/pci.c b/pci.c >> index 0a06d86..e559ae8 100644 >> --- a/pci.c >> +++ b/pci.c >> @@ -158,11 +158,6 @@ get_pci_device_info(struct pci_device *dev, struct >hba_info *hba_info) >> u_int8_t hdr_type; >> char *unknown = "Unknown"; >> >> - hba_info->vendor_id = dev->vendor_id; >> - hba_info->device_id = dev->device_id; >> - hba_info->subsystem_vendor_id = dev->subvendor_id; >> - hba_info->subsystem_device_id = dev->subdevice_id; >> - >> name = pci_device_get_vendor_name(dev); >> if (!name) >> name = unknown; >> @@ -178,12 +173,9 @@ get_pci_device_info(struct pci_device *dev, struct >hba_info *hba_info) >> name, sizeof(hba_info->ModelDescription)); >> >> /* >> - * Reading device class and revision from PCIe >> + * Reading hardware revision from PCIe >> * configuration header space. >> */ >> - pci_device_cfg_read_u16(dev, &class, PCI_CLASS_DEVICE); >> - hba_info->device_class = class; >> - >> pci_device_cfg_read_u8(dev, &revision, PCI_REVISION_ID); >> snprintf(hba_info->HardwareVersion, >> sizeof(hba_info->HardwareVersion), >> >> _______________________________________________ >> devel mailing list >> [email protected] >> http://www.open-fcoe.org/mailman/listinfo/devel
_______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
