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

Love, Robert W robert.w.love at intel.com
Wed Apr 15 20:12:00 UTC 2009


Steve Ma wrote:
> 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. ---
> 
Am I correct that the reason we wouldn't remove the libpciaccess
routines instead is that netdev based HBAs don't expose correct vendor
information in the fc_host info?

This might be OK for now, but it seems that we'd want to get that info
from netdev or another way since the fc_host's info in sysfs is a nice
generic place to get info.

Also, why comment out and not remove?

>  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
> 
> _______________________________________________
> devel mailing list
> devel at open-fcoe.org
> http://www.open-fcoe.org/mailman/listinfo/devel




More information about the devel mailing list