aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfad_attr.c
AgeCommit message (Collapse)Author
2012-09-24[SCSI] bfa: Add new hardware model info to sysfs model description routine.Krishna Gudipati
- Added new hardware model Brocade-1867 information to sysfs model description routine. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: FCS remote port enhancements.Krishna Gudipati
- Introduced rport qualifier structure and modified design to export remote ports with valid pid or valid pwwn to the user space. - Introduced old_pid field in the rport structure and made changes to prevent re-creating a new remote port for an already existing rport that is transitioning to a delete state. (Happens if we receive a RSCN on the existing remote port that is getting deleted). Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: Support vport symbolic name change from sysfs.Krishna Gudipati
- Implemented the FC function template set_vport_symbolic_name entry point to modify the vport symbolic name from sysfs. - Implemented support to send RSPN_ID to switch to register the modified vport symbolic name. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-05-22[SCSI] bfa: Fix to set vport FC host sysfs entriesKrishna Gudipati
Made changes to set the fc_host sysfs entries supported_speeds, supported_classes etc., during the vport creation from the FC transport template. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: sysfs model description fix.Krishna Gudipati
Make changes to remove unsupported model numbers from the sysfs model description routine. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-04-25[SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo ↵Krishna Gudipati
response. Made changes to avoid queuing the vport delete work to IM driver work queue in the bfa_fcb_lport_delete() - since at this stage we are not completely done with using the vport structure as we are still waiting for the LOGO response from the fw in online state or just doing some cleanup. Since queuing up the vport delete work at this stage will result in the FC transport layer to clean up the vport before we get the response from firmware. Made changes to queue the port delete work to the IM driver work queue - from the bfa_fcs_vport_free() function since at this state we are done with using the vport data structure and the FCS state machine is completely cleaned up. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.Krishna Gudipati
Fixed the LPS (Logical Port Services) state machine to send a FDISC/FLOGI to the FW from the request queue wait state, when there is space available again on the request queue. Made changes to free the vport on LOGO/cleanup complete instead of free'ing it from vport_delete_handler in the module unload scenario. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Add fc host issue lip supportKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10[SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.Krishna Gudipati
This patch re-implements LUN Masking feature using SCSI Slave Callouts. With the new design in the slave_alloc entry point; for each new LUN discovered we check with our internal LUN Masking config whether to expose or to mask this particular LUN. We return -ENXIO (No such device or address) from slave_alloc for the LUNs we don't want to be exposed. We also notify the SCSI mid-layer to do a sequential LUN scan rather than REPORT_LUNS based scan if LUN masking is enabled on our HBA port, since a -ENXIO from any LUN in REPORT_LUNS based scan translates to a scan abort. This patch also handles the dynamic lun masking config change from enable to disable or vice-versa by resetting sdev_bflags of LUN 0 appropriately. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Add BSG interface to support ELS, CT and vendor commands.Krishna Gudipati
- Added BSG interface support to BFA driver - Adds support to send ELS/CT FC passthru commands and few vendor specific BSG requests. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Driver initialization and model description fixKrishna Gudipati
- Moved FCS initialization, which internally does the im_port creation as well as the scsi_host creation before bfa_init. Once the bfa_init is complete & successful: - Reset the FCS base port cfg params such as pwwn/nwwn and setup fc host params - based on the values learned during the ioc getattr request. - Change needed to support BSG commands even on bfa init failure. - Model description fixes for Brocade adapters. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Brocade-1860 Fabric Adapter 16Gbs support and flash controller ↵Krishna Gudipati
fixes. - Added support for 16Gbps. - Added logic to flush pending mailbox command queue when IOC is disabled. - Fix to Halt the flash controller during fw initialization - since when asic blck is programmed flash controller's continuous access blocks f/w access to flash. - Added new asic based card types and modified IOC get card model routine. - Added PLL init fix to do LPU reset every time we do a memory initialization, since not doing so will cause LPU to be uninitialized during driver load. - Added fix to Halt flash controller before PLL initialization. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2010-12-21[SCSI] bfa: remove all OS wrappersMaggie Zhang
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: fix regular sparse check warnings.Maggie
Fix all sparse check warnings from make C=2. Signed-off-by: Maggie <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: fix comments for c filesJing Huang
This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com) regarding comment blocks that begining with "/**". bfa driver comments currently do not follow kernel-doc convention, we hence replace all /** with /* and **/ with */. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: replace endian swap macros with the ones provided by linuxJing Huang
Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-16[SCSI] bfa: cleanup driverKrishna Gudipati
We have flattened the BFA hierarchy and also reduced the number of source and header files we used to have earlier. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] bfa: vport fixesJing Huang
This patch fixes 3 bugs in vport create/delete. 1) Replace scsi_add_host() with scsi_add_host_with_dma() 2) Fix rmmod hang when there are vports configured. This is due to a race condition between the workqueue destroy in pci remove context and the vport delete works being handled. The fix is to use a counter to track the vport delete work, so that workqueue destroy will not be called until all configured vports are deleted from workqueue. 3) Fix rmmmod crash when there are PBC vport configured. PBC is not allowed to be deleted dynamically. However, if someone try to delete it, it leaves the vport is wrong state. The fix is to restore the vport back to original state when the attempt to delete pbc vport delete is failed. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] bfa: PBC vport createJing Huang
This patch enables creating PBC vport. During fcs init, fcs will read PBC vport using bfa iocfc API and invoke fcb callback to add the pbc vport entries into a list. The pbc vport list will be traversed in the subsequent pci probe process and vport will be created using fc transport provided vport create function. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-04-11[SCSI] bfa: add fc transport class based vport create/deleteJing Huang
Use duplicate fc transport template for physical and vitual port. Add vport create/delete/disalbe functions in the transport template of physical port. Changes to make the vport create/delete function to work under this framework. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-07[SCSI] bfa: Modified the portstats get/clear logicKrishna Gudipati
Modified the portstats get/clear logic for port physical/FCoE/QoS stats. Added more stats to FC Fixed some issues with FCoE stats collection. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-03-07[SCSI] bfa: Replace bfa_get_attr() with specific APIsKrishna Gudipati
bfa_ioc_attr_s is a big structure and some times could cause stack overflow if defined locally, so add specific APIs that are needed to replace the use of ioc_attr local var. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-03-07[SCSI] bfa: Rename pport to fcport in BFA FCS.Krishna Gudipati
Rename pport structures to fcport in BFA FCS, to resolve confusion about the port structures in the firmware, and make sure the SG page is setup correctly. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-03-04[SCSI] bfa: Added separate MSI-X module parameters.Krishna Gudipati
Added separate MSI-X module parameters to selectively enable / disable MSI-X interrupts for both Brocade HBA and CNA's. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] bfa: Brocade BFA FC SCSI driverJing Huang
Add new driver for Brocade Hardware Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>