[Open-FCoE] [RFC PATCH] linhbalinux: Remove the suppoort of driver name and version

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


Steve Ma wrote:
> The driver name name and version are optional HBA attributes
> accdording to T11 FC-HBA spec. This patch is to comment out
> the code intended to find the driver name and version. The
> existing code do not work because sysfs does have these items.
> ---
> 
Same comments as another patch, just because they're optional isn't
a strong justification on it's own to remove the functionality.

I think there is a typo in the last sentence, do you mean to say,
"sysfs does _not_ have these items"? If so, do you really mean that
netdev based FCoE instances don't have this info? Can we make
changes to the kernel code to provide this info correctly?

Joe: Does fnic provide this information correctly?

Finally, why comment out and not remove the code?

>  lport.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/lport.c b/lport.c
> index dbb59d6..468e72e 100644
> --- a/lport.c
> +++ b/lport.c
> @@ -373,9 +373,11 @@ sysfs_scan(struct dirent *dp, void *arg)
>  	/* Get VendorSpecificID (TODO) */
>  	atp->VendorSpecificID = HBA_VENDOR_SPECIFIC_ID;
> 
> +#if 0
>  	/* Get DriverVersion */
>  	rc = sa_sys_read_line(hba_dir, SYSFS_MODULE_VER,
>  			atp->DriverVersion, sizeof(atp->DriverVersion));
> +#endif
> 
>  	/* Get NodeSymbolicName */
>  	sa_strncpy_safe(atp->NodeSymbolicName,
> sizeof(atp->NodeSymbolicName), @@ -387,6 +389,7 @@ sysfs_scan(struct
>  	dirent *dp, void *arg) memcpy((char *)&atp->NodeWWN, (char
>  		*)&pap->NodeWWN, sizeof(pap->NodeWWN));
> 
> +#if 0
>  	/* Get DriverName */
>  	snprintf(drv_dir, sizeof(drv_dir), "%s" SYSFS_MODULE , hba_dir);
>  	i = readlink(drv_dir, buf, sizeof(buf));
> @@ -404,6 +407,7 @@ sysfs_scan(struct dirent *dp, void *arg)
>  		driverName = strstr(buf, "module") + 7;
>  	sa_strncpy_safe(atp->DriverName, sizeof(atp->DriverName),
>  			driverName, sizeof(atp->DriverName));
> +#endif
> 
>  	/*
>  	 * Give HBA to library
> 
> _______________________________________________
> devel mailing list
> devel at open-fcoe.org
> http://www.open-fcoe.org/mailman/listinfo/devel




More information about the devel mailing list