From: Jing Huang <huangj@brocade.com> This patch contains document of brocade specific sysfs interface. It is created using 2.6.27-rc7 kernel. Signed-off-by: Jing Huang <huangj@brocade.com> --- Documentation/ABI/testing/sysfs-devices-bfa | 600 ++++++++++++++++++++++++++++ 1 files changed, 600 insertions(+) diff -urpN orig/Documentation/ABI/testing/sysfs-devices-bfa patch/Documentation/ABI/testing/sysfs-devices-bfa --- orig/Documentation/ABI/testing/sysfs-devices-bfa 1969-12-31 16:00:00.000000000 -0800 +++ patch/Documentation/ABI/testing/sysfs-devices-bfa 2008-09-24 12:08:25.000000000 -0700 @@ -0,0 +1,600 @@ +What: /sys/devices/<Brocade HBA PCI path>/bfa +Date: July 2008 +Contact: Jing Huang <huangj@brocade.com> +Description: + The /sys/devices/<Brocade HBA device path>/bfa will contain + files and subdirectories to display internal states and + statistics of Brocade HBA. It also provides a configuration and + management interface for each HBA instance. + +What: /sys/devices/<Brocade HBA PCI path>/bfa/ioc +Date: July 2008 +Contact: Jing Huang <huangj@brocade.com> +Description: + The /sys/devices/<Brocade HBA device path>/ioc will contain + files and directories to display ioc level attributes + and statistics of the HBA. + +Files and directories under /sys/devices/<Brocade HBA PCI path>/bfa/ioc: +------------------------------------------------------------------------ + +bios_ver + + BIOS version + +chip_rev + + Chip version + +fw_ver + Firmware version + +hw_name + + Hardware name or pci path + +hw_ver + + Hardware version + +intr + Interrupt coalescing setting + +manufacturer + + Manufacturer info + +model_desc + + Model description + +mpiomode + + mpio mode setting of IOC + +name + Name of the driver + +nwwn + World Wide Node Name + +optrom_ver + + Option Rom version + +port_count + + Port count of the HBA + +power + + IOC power state + +pwwn + + World Wide Node Name + +serial_num + + Serial ...
What about my question for the need for all of these files and using debugfs instead? thanks, greg k-h --
The reason we creating our own sysfs directory under /sys/devices path was we felt the fc transport and scsi host attributes are not enough for all the HBA management features we want to have. We have ioctl in our non opensource driver, and we want to have something to emulate all/most of the IOCTL functionality we have in the opensource driver. We provide multi-level of driver/fw statistics info to the user, and we want to put those info under a separate directory instead of throw them all under scsi_host. I just didn't know how to create a subdirectory under scsi/fc host. Currently, we only implement a small portion of all the IOCTL functionalities. We want to know if this is acceptable in the upstream kernel. I agree that there are a lot of redundancy with the attributes we created under scsi_host. We will clean them up. Jing -----Original Message----- From: Greg KH [mailto:greg@kroah.com] Sent: Thursday, September 25, 2008 7:55 PM To: Jing Huang Cc: James.Bottomley@HansenPartnership.com; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Ramkumar Vadivelu; Srikanth Rayas (CW); Vinodh Ravindran Subject: Re: [PATCH 5/6] bfa: Brocade BFA FC SCSI driver submission (2ndtry) What about my question for the need for all of these files and using debugfs instead? thanks, greg k-h --
This isn't really a valid reason. We use the fc transport class to share infrastructure and provide a common interface for users. If you need more, we can discuss adding features to the fc transport class if they would be useful to fibre drivers in general. If they're not useful to other drivers, then you can add pieces specific to your driver for them, but the functionality that's already in the fc transport shouldn't That's how the fc transport class currently operates. It's statistics all appear in a "statistics" directory under the host. If you use it (and add the ones you need that are missing) everyone will be happy and James --
Hi James, It is encouraging to know that we can discuss and add new feature into existing fc transport. I guess this is opensource all about. I didn't have linux opensource experience before, so I was not quite sure how easy to request new features in fc transport such as mechanism to create multiple subdirectories for different level of statistics info in addition to the snia fc statitistics we already have, and other features such as CT/SCSI passthru and asynchronous event notification etc. Thanks Jing -----Original Message----- From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com] Sent: Thursday, September 25, 2008 11:02 PM To: Jing Huang Cc: Greg KH; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Ramkumar Vadivelu; Srikanth Rayas (CW); Vinodh Ravindran Subject: RE: [PATCH 5/6] bfa: Brocade BFA FC SCSI driver submission (2ndtry) This isn't really a valid reason. We use the fc transport class to share infrastructure and provide a common interface for users. If you need more, we can discuss adding features to the fc transport class if they would be useful to fibre drivers in general. If they're not useful to other drivers, then you can add pieces specific to your driver for them, but the functionality that's already in the fc transport shouldn't That's how the fc transport class currently operates. It's statistics all appear in a "statistics" directory under the host. If you use it (and add the ones you need that are missing) everyone will be happy and James --
We are finally finishing up CT/ELS passthru in the FC transport; SCSI passthru exists, but via the scsi_generic driver (so it's not part of the transport or LLDD); and async event notification is already present in the fc transport. -- james s --
Thanks James. I guess I need to follow up all the updates on this front, and will change our management tools accordingly. Jing -----Original Message----- From: James Smart [mailto:James.Smart@Emulex.Com] Sent: Friday, September 26, 2008 4:08 AM To: Jing Huang Cc: James Bottomley; Greg KH; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Ramkumar Vadivelu; Srikanth Rayas (CW); Vinodh Ravindran Subject: Re: [PATCH 5/6] bfa: Brocade BFA FC SCSI driver submission (2ndtry) We are finally finishing up CT/ELS passthru in the FC transport; SCSI passthru exists, but via the scsi_generic driver (so it's not part of the transport or LLDD); and async event notification is already present in the fc transport. -- james s --
Well, this is open source ... you don't get to request new features; you get to implement them, so if you need something that SCSI or the FC transport doesn't provide, you just add it (rather than coding either a fix or an enhancement for your driver alone). However, you're quite lucky. So far, as James Smart said, I haven't seen you ask for any features that we don't either provide or are in process of agreeing the implementation of. James --
