[Open-FCoE] [RFC PATCH] libhbalinux: Comment out the code of finding device_id, vendor_id, etc.

Steve Ma steve.ma at intel.com
Wed Apr 15 19:45:15 UTC 2009


vendor_id, device_id, subsystem_vendor_id, subsystem_device_id, device_class
are obtained using the libpciaccess routines. the code to obtain these items
from the sysfs are duplicate of the same effort. Also the code does not work.
This patch is to comment it out the code of accessing the sysfs.
---

 lport.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lport.c b/lport.c
index 468e72e..7b46f83 100644
--- a/lport.c
+++ b/lport.c
@@ -314,6 +314,7 @@ 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);
 
@@ -331,6 +332,7 @@ 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




More information about the devel mailing list