aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa
AgeCommit message (Collapse)Author
2012-02-19[SCSI] bfa: don't leak mem in bfad_im_bsg_els_ct_request()Jesper Juhl
If 'drv_fcxp = kzalloc(sizeof(struct bfad_fcxp), GFP_KERNEL);' fails and returns NULL, then we'll leak the memory allocated to 'bsg_fcpt' when we jump to 'out:' and the variable subsequently goes out of scope. Also remove the cast of the kzalloc() return value. kzalloc() returns a void* which is implicitly converted, so the explicit cast is pointless. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-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>
2012-01-10[SCSI] bfa: Revert back the current LUN Masking Implementation.Krishna Gudipati
This patch reverts the current LUN Masking Implementation. We re-implemented this feature using the SCSI Slave Callout's as per the review comments. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10[SCSI] bfa: Fix possible NULL pointer dereference in lunmask add/delete.Krishna Gudipati
Patch fixes the possible NULL pointer dereference when we try to add or delete a rpwwn to the lunmask config which is not zoned to this port. Check if the FCS rport is not NULL before de-referencing it. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-10Merge tag 'scsi-misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 SCSI updates for post 3.2 merge window * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (67 commits) [SCSI] lpfc 8.3.28: Update driver version to 8.3.28 [SCSI] lpfc 8.3.28: Add Loopback support for SLI4 adapters [SCSI] lpfc 8.3.28: Critical Miscellaneous fixes [SCSI] Lpfc 8.3.28: FC and SCSI Discovery Fixes [SCSI] lpfc 8.3.28: Add support for ABTS failure handling [SCSI] lpfc 8.3.28: SLI fixes and added SLI4 support [SCSI] lpfc 8.3.28: Miscellaneous fixes in sysfs and mgmt interfaces [SCSI] mpt2sas: Removed redundant calling of _scsih_probe_devices() from _scsih_probe [SCSI] mac_scsi: Remove obsolete IRQ_FLG_* users [SCSI] qla4xxx: Update driver version to 5.02.00-k10 [SCSI] qla4xxx: check for FW alive before calling chip_reset [SCSI] qla4xxx: Fix qla4xxx_dump_buffer to dump buffer correctly [SCSI] qla4xxx: Fix the IDC locking mechanism [SCSI] qla4xxx: Wait for disable_acb before doing set_acb [SCSI] qla4xxx: Don't recover adapter if device state is FAILED [SCSI] qla4xxx: fix call trace on rmmod with ql4xdontresethba=1 [SCSI] qla4xxx: Fix CPU lockups when ql4xdontresethba set [SCSI] qla4xxx: Perform context resets in case of context failures. [SCSI] iscsi class: export pid of process that created [SCSI] mpt2sas: Remove unused duplicate diag_buffer_enable param ...
2012-01-03switch debugfs to umode_tAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-12-15[SCSI] bfa: fix endian and bit field check bugJing Huang
Fix some endian issue. __BIGENDIAN is not defined and it needs to be replaced with __BIG_ENDIAN. Also fixed a bug in bit field access. These two issues were reported by Dan Carpenter. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-12-15[SCSI] bfa: fix formating and checkpatch issuesJing Huang
Fixed code indentation and alignment issues. Fixed all checkpatch warnings. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-31scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as requiredPaul Gortmaker
For the basic SCSI infrastructure files that are exporting symbols but not modules themselves, add in the basic export.h header file to allow the exports. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-15Merge branch 'master' into for-nextJiri Kosina
Fast-forward merge with Linus to be able to merge patches based on more recent version of the tree.
2011-09-15Remove unneeded version.h includes from drivers/scsi/Jesper Juhl
It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/scsi/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-27[SCSI] bfa: Update the driver version to 3.0.2.2Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to configure lunmaskingKrishna Gudipati
- Added support to enable / disable lunmasking on Brocade adapter ports. - Added support to query / clear lunmasking configuration. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Introduced initiator based lun masking feature.Krishna Gudipati
- Added support to enable initiator based lun masking. - Initiator based Lun masking works similar to zoning where initiator port is allowed to see only those LUNs which are configured to be seen. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to store driver configuration in flash.Krishna Gudipati
- Added dconf (Driver Config) BFA sub-module. - The dconf sub-module provides interfaces and manages flash writes to the flash DRV parition. - dconf sub-module also ensures that the whole 64K DRV partition is updated on a flash write. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to collect / reset fabric stats.Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to configure QOS and collect stats.Krishna Gudipati
- Added support to configure QOS on Brocade adapter ports. - Added support to collect / reset QOS statistics. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to configure trunking on Brocade adapter ports.Krishna Gudipati
- Added logic to enable / disable trunking on Brocade adapter ports. - Added logic to query trunking info. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to configure and query flash boot partitionKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to collect and reset fcport statsKrishna Gudipati
- Added support to collect and reset fcport stats. - Modified design to allow multiple requests for fcport stats. - fcport will remember the stats request in its stats_pending queue and service each of the queued requests after receiving a firmware response for the prior request. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support for IO profiling.Krishna Gudipati
- Made changes to support IO profiling. - Added support to configure and query IO profiling info. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Extend BSG to support more user commandsKrishna Gudipati
Extended BSG to support stats, port log and trace reset and to support adapter, port SET operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Check supported speed based on port modeKrishna Gudipati
Added logic to check the loopback test input speed based on port mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Update RME interrupt handling.Krishna Gudipati
- Made changes to always acknowledge RME interrupt and update consumer index (CI) when RME interrupt is generated. - Made changes to have ASIC specific hw_rspq_ack() handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: use negative error return values in all functionsKrishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add FC-transport based Asynchronous Event Notification support.Krishna Gudipati
- Added support to post vendor unique events on fc_host. - Supports adapter, port, ioc, flash and remote port based AEN events. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Update the driver version to 3.0.2.1Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Driver and BSG enhancements.Krishna Gudipati
- Added a new module parameter max_xfer_size to set the max_sectors in the scsi_host template. - Added logic to handle request_irq() failure so that msix vector resource is de-allocated immediately when failure happens. - BSG enhancements to collect vHBA releated info and port log. - Removed the workaround of incrementing the module refcnt on bsg request. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support to query PHY.Krishna Gudipati
- Added PHY sub-module. - Implemented interface to obtain stats and to read/update the fw from the PHY module. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added HBA diagnostics support.Krishna Gudipati
- Added diagnostics sub-module to BFA. - Implemented interface to perform memtest/loopback test and some other diagnostics tests. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support for flash configurationKrishna Gudipati
- Added flash sub-module. - Implemented the interface to read/erase/update flash partition. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support to obtain SFP info.Krishna Gudipati
- Added SFP sub-module to BFA. - Added interface to collect sfp media info and sfp speed. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support for CEE info and stats query.Krishna Gudipati
- Added CEE sub-module. - Added support to collect stats/cee module info using BSG interface. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Extend BSG interface.Krishna Gudipati
- Added support to collect driver/fw stats. - Added support to perform adapter/ioc enable, disable operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: FCS bug fixes.Krishna Gudipati
- Added logic to initiate a PLOGI to the target, while processing a LOGO from the same target in Direct attach mode. - Added logic to generate a FCCT Reject indicating unsupported command, upon receiving FCCT/FCGS requests. - Added logic to set the fcpim in offline state and avoid any PRLI retries if a PRLI response is a reject with a reason Command Not Supported. - Updated the FDMI Supported/Current speeds. - Added logic to wait for the response from the firmware before sending ACC to PLOGI and transitioning to subsequent states - while processing an Incoming PLOGI in online state. - Added a wait state in the fcs_vport state machine - For case where FDISC is in progress and we get a vport delete request we wait for fdisc response and will transition to the appropriate state based on rsp status, else its causing both driver/fw resources to be not freed. - Remove the fc_credit_recovery module param. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: DMA memory allocation enhancement.Krishna Gudipati
- Modified the design such that each BFA sub-module will provide the amount of DMA and KVA memory needed by it and queues the same request to the global dma and kva info queues. - During the memory allocation we iterate over this queue to allocate the dma and kva memory requested by sub-modules. - The change is needed to avoid requesting the aggregate amount of memory needed by all the BFA sub-modules as one contiguous chunk. 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 vHBA support.Krishna Gudipati
- Introduced partitioning of the BFA resources. - Added h/w queue ID in CPE messages, firmware uses h/w queue ID from messages to pick a matching RME queue. - Added message header to bfa_reqq_produce(). h/w queue ID is set in the message header and firmware modules use h/w queue ID from message header instead of from cpqe event. - Made changes to allow using all 256 queues of Brocade-1860 asic. Previously only a single queue per queue group was used. - Added function tag to BFI message header. Only used by FC BFI messages. Used to translate host tag to firmware tag. bfa_lpuid() is changed to bfa_fn_lpu() that encodes both PCI function and port ID in BFI message header. 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 PLL init fixes.Krishna Gudipati
- If flash controller is halted unconditionally, this results in illegal write access to flash controller register domain. Since flash controller registers are only accessible once s_clk is started - added logic to check for WGN status and halt flash controller only if it is already running. - Added check to wait for flash controller halt to be completed before proceeding with s_clk/l_clk initializations. - Removed unnecessary reset logic for PMM 1T memory and moved memory initialization after flash access enable. - Disable Brocade-1860 asic MBOX interrupt before PLL initialization. - Remove reset enable for S_CLK/L_CLK after both PLL initializations are complete. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added Fabric Assigned Address(FAA) supportKrishna Gudipati
- Updated/added data structures and definitions to support FAA protocol. - Modified the IOC state machine to support FAA. - Introduced FAA feature configuration - enable/disable/query. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: IOC bug fixes.Krishna Gudipati
- Add logic to handle the case where PCI mapping goes away when IOCPF state machine is waiting for semaphore. - Added logic to unlock hw semaphore if the previos FW boot was from flash based and the current FW initialization attempt is from OS. - Added fix to update hbfails and hb_count stats during hwerror event. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Enable ASIC block configuration and query.Krishna Gudipati
- Added ASIC block configuration APIs: - to create/delete/update the physical functions - to do adapter/port mode configuration - to query the current ASIC block configuration. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Update the driver version to 3.0.2.0Krishna Gudipati
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: Enhancement for fcpim and IO tag handling.Krishna Gudipati
- Enhancements to FCPIM module. - Introduced IO tag management to allocate/release IOs to FCPIM module from a free IOtag pool. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: FC credit recovery and misc bug fixes.Krishna Gudipati
- Introduce FC credit recovery. - Added module parameter to enable/disable credit recovery. Bug Fixes: - Removed check for ignoring plogi from initiator in switched fabric mode. - The ABTS for PLOGI is going out few millisecs earlier due to FW timer calibration (around 300 miilisecs earlier). So there is a window if an accept comes during this time HBA would have initiated an ABORT. - Added 1 to FC_ELS_TOV for compensating for FW timer. 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>
2011-06-29[SCSI] bfa: IOC and PLL init changes for Brocade-1860 Fabric Adapter.Krishna Gudipati
- Introduced IOC poll mechanism which replaces current interrupt based FW READY method. - The timer based poll routine in IOC will query the ioc_fwstate register to see if there is a state change in FW, and sends the READY event. - Bug fixes in the new asic PLL initialization. - Added logic to handle CPE/RME queue interrupts before iocfc config done. 1. Use the queue_process flag to see if iocfc configuration is done in INTX mode. 2. Split the MSIX handler installation in two - one for IOC intr handler and the other for cpe/rme queue handler - and delay assigning queue handlers until iocfc config is done in MSIX mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Changes to support vport disable and enable operations.Krishna Gudipati
Made changes to FCS lport, vport state machines to support vport enable / disable operations. 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 Hardware EnablementKrishna Gudipati
- Added support for Brocade-1860 Fabric Adapter. - Made changes to support single firmware image per asic type. - Combined bfi_cbreg.h and bfi_ctreg.h defines into bfi_reg.h with only minimal defines used by host. - Added changes to setup CPE/RME Queue register offsets based on firmware response. - Removed queue register offset initializations and added register offsets to BFI config response message. - Added Brocade-1860 asic specific interrupt status definitions and mailbox interfaces. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>