aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_tgt.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-07-27[SCSI] fcoe: clean up TBD comments in FCoE prototype headerJoe Eykholt1-11/+4
Some old comments in fc_fcoe.h say TBD long after the standard has been passed by T11. Clean them up. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] libfc: Honor LS_ACC response codes for PRLIBhanu Prakash Gollapudi1-4/+19
As per FC-LS Rev 1.62 table 46, response codes are handled as follows: 1. If the Req executed is true, PRLI is accepted. 2. If Req executed is not set, if resp code is 5, PRLI is not retried and port is logged out. 3. If resp code is anything apart from 1 or 5, PRLI is retired upto max retry count. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] libfc: Retry a rejected PRLI requestBhanu Prakash Gollapudi1-1/+1
Retry upto max_rport_retry_count when a target responds with LS_RJT for a PRLI request. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] libfcoe: No solicitation if adv is droppedBhanu Prakash Gollapudi1-1/+4
Host does not send discovery solicitation messages if Disc. Adv from FCF are dropped. It restarts sending solicitation only after receiving a Discovery Adv. from FCF. Fix is to restart solicitation immediately after CVL processing. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] libfcoe: Avoid hang when receiving non-critical descriptorsBhanu Prakash Gollapudi1-2/+2
Avoid infinite loop while processing FIP ELS or discovery advertisement with non-critical descriptors. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Acked-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] libfcoe: FIP link keep-alive should continue while logged offJoe Eykholt1-1/+1
A check in fcoe_ctlr_send_keep_alive() returns if there's no port_id for the local port. This could miss a keep alive if we just did a host reset and have logged off and will log back in. Return only if we are doing the port keep alive, in which case we need to be logged in. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: move setting of the allow_restart flag for vsets and disksWayne Boyer1-3/+2
A problem was found where the call to scsi_add_device() fails intermittently for an adapter. This is caused when __scsi_add_device() returns -ENODEV as a result of not calling scsi_probe_and_add_lun() since the call to scsi_host_scan_allowed() fails. scsi_host_scan_allowed() fails because the adapter state is set to SHOST_RECOVERY instead of SHOST_RUNNING. The state of the adapter is being set to SHOST_RECOVERY by scsi_eh_scmd_add() during error handling. This problem is avoided by moving the setting of the allow_restart flag to later in the device initialization sequence. This prevents further error handling if we get a NOT_READY response from a TUR command by causing scsi_check_sense() to return SUCCESS. Therefore, scsi_eh_scmd_add() will not run and the adapter state will remain as SHOST_RUNNING. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] be2iscsi: fix null dereference on error pathDan Carpenter1-2/+2
"phba" is always null here so we can't dereference it. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] be2iscsi: fix memory leak on error pathDan Carpenter1-0/+1
I added a kfree(pwrb_arr) in front of the return. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add writeq definition if neededWayne Boyer1-0/+8
Compiling the driver will fail on 32 bit powerpc and other architectures where writeq is not defined. This patch adds a definition for writeq. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] be2iscsi: fix disconnection cleanupMike Christie3-71/+56
This patch fixes 4 bugs in the connection connect/disconnect cleanup path. 1. If beiscsi_open_conn fails beiscsi_free_ep was always being called, and if beiscsi_open_conn failed because beiscsi_get_cid failed then we would free an unallocated cid. 2. If beiscsi_ep_connect failed due to a beiscsi_open_conn failure it was leaking iscsi_endpoints. 3. beiscsi_ep_disconnect was leaking iscsi_endpoints. beiscsi_ep_disconnect should free the iscsi_endpoint. We cannot do it in beiscsi_conn_stop because that is only called for iscsi connection cleanup. If beiscsi_ep_connect returns success, but then the poll function fails or the connect times out then beiscsi_ep_disconnect will be called to clean up the ep. The conn_stop callout will not be called in that path. 4. beiscsi_conn_stop was freeing the iscsi_endpoint then accessing it a couple lines later. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.14: Update Driver version to 8.3.14James Smart1-1/+1
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.14: SCSI and SLI API fixesJames Smart8-11/+62
- Fixed accounting of allocated SCSI buffers when post sgl fails. - Restrict scsi buffer allocation based on LUN count (sdev_cnt). - Create __lpfc_sli_free_rpi that doesn't take out the hbalock. - Modify lpfc_sli_free_rpi to call __lpfc_sli_free_rpi. - Call __lpfc_sli_free_rpi in lpfc_cleanup_pending_mbox. - Do not swap the strings returned in mailbox commands and do not swap byte aligned data in VPD. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.14: FCoE Discovery FixesJames Smart4-20/+175
- Prevent unregistring of unused FCF when FLOGI is pending. - Prevent point to point discovery on a FCoE HBA. - Fixed FCF discovery failure after swapping FCoE port by switching over to fast failover method when no FCF matches in-use FCF. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.14: PCI fixes and enhancementsJames Smart5-41/+228
- Allow enabling MSI-X intterupts with fewer vectors than requested by looking at the return value from pci_enable_msix. - Implemented driver PCI AER error handling routines for supporting AER error recovering on SLI4 devices. - Remove redundant SLI_ACTIVE checks Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] pmcraid: MSI-X support and other changesAnil Ravindranath2-348/+843
1. MSI-X interrupt support 2. Driver changes to support new maxRAID controller FW version. The changes are mainly done to handle async notification changes done in newer controller FW version. 3. Added state change notifications to notify applications of controller states. Signed-off-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: Update Driver Version to 8.3.13James Smart1-1/+1
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.James Smart11-41/+310
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: Misc fixesJames Smart5-2/+13
- Change the Max receive size on CIN FCFs to 0x800 - (From linux community) Check boundary before checking for NULL. - Update last completion time for completed I/O to prevent heartbeat. - Add Balius PCI Device IDs Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: SCSI specific changesJames Smart3-3/+17
- Fix hba_queue_depth to reflect actual available XRIs - Add support for new SLER specific firmware status codes. - Free SCSI buffer when iotag allocation fails. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: Initialization code clean up and fixes.James Smart6-40/+43
- Add poll or wait flag parameter to hba_init_link and hba_down_link. - (From Linux Community) Make return with ENXIO negative. - Remove unused INB code from driver. - Prevent block_magmt_io from returning until mailbox is inactive. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] lpfc 8.3.13: FC Discovery Fixes and enhancements.James Smart5-4/+50
- Retry PLOGI up to 48 times when LS_RJT reason is "Unable to supply requested data." - When dev loss timeout occures do not change state if there is an outstanding REG_LOGIN. - Add logic to ignore REG_LOGIN completion if discovery is restarted while waiting for REG_LOGIN. - Only change state on REG_LOGIN completion if still in state waiting for REG_LOGIN completion. - Only send ADISCs to FCP-2 Targets (not Initiators). Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add endian swap enablement for 64 bit adaptersWayne Boyer2-4/+24
A change in the hardware design of the chip for the new adapters changes the default endianness of MMIO operations. This patch adds a register definition which when written to with a predefined value will change the endianness back to what the driver expects. This patch also fixes two problems found during testing. First, the first reserved field in the ipr_hostrcb64_fabirc_desc structure only reserved one byte. The correct amount to reserve is 2 bytes. Second, the reserved field of the ipr_hostrcb64_error structure only reserved 2 bytes. The correct amount to reserve is 16 bytes. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] dpt_i2o: Use GFP_ATOMIC when a lock is heldJulia Lawall1-5/+10
The function adpt_i2o_post_wait is called from several places, in some of which, such as adpt_abort, a lock may be held. The functions adpt_i2o_reparse_lct and adpt_i2o_lct_get are called from several places, including adpt_rescan where a lock may be held. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @gfp exists@ identifier fn; position p; @@ fn(...) { ... when != spin_unlock_irqrestore when any GFP_KERNEL@p ... when any } @locked@ identifier gfp.fn; @@ spin_lock_irqsave(...) ... when != spin_unlock_irqrestore fn(...) @depends on locked@ position gfp.p; @@ - GFP_KERNEL@p + GFP_ATOMIC // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Updated version number to 8.03.03-k0.Giridhar Malavali1-3/+3
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: For ISP 23xx, select user specified login timeout value if greater than minuimum value(4 secs).Andrew Vasquez1-10/+22
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Removed redundant check for ISP 84xx.Giridhar Malavali1-1/+1
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Enable CRB based doorbell posting for request queue as default for ISP 82xx.Giridhar Malavali2-5/+10
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: T10 DIF enablement for 81XXArun Easi2-3/+3
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Fix flash write failure on ISP82xx.Lalit Chandivade1-3/+4
Driver was not unprotecting correctly, use correct bits to unprotect the flash on ISP 82xx. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Handle outstanding mbx cmds on hung f/w scenarios.Santosh Vernekar4-24/+78
Outstanding mailbox commands, have no way to recover on f/w hung, and we timeout on waiting for mbx response. This in turn affects the recovery process as follows: - We might already be in dpc while waiting for mbx to complete, so recovery for that pci function will never get invoked. Reset Timeout (10 sec) is far less than mbx timeout (30 sec). - Other mbx cmds will get stuck due to serial mbx access. Solution is to identify fw-hung scenario and handle outstanding mbx commands to have an early-exit instead of waiting for response. Other mbx commands waiting for access will also do an early-exit if fw-hung is still applicable. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Do not enable VP in non fabric topology.Lalit Chandivade1-1/+2
After topology change ISP is reset and VPs are re-enabled. If the topology is not fabric, VPs could falsely get enabled. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.Harish Zunjarrao3-7/+215
Used bootloder address from FLT while loading FW from flash as well. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Make the FC port capability mutual exclusive.Andrew Vasquez1-2/+2
In case of both target and initiator capabilities reported by fc port, the fc port port capability is made mutualy exclusive with priority given for target capabilities. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Add internal loopback support for ISP81xx.Sarang Radke7-17/+269
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Limit rport-flaps during link-disruptions.Giridhar Malavali1-3/+5
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Correct async-srb issues.Andrew Vasquez2-7/+15
* hold the hardware_lock throughout the duration of ctx-sp timeout handling -- could result in use-after-free oops. * retry a timed-out login-request. * done() routines are called with the hardware-lock held, issue qla2x00_mark_device_lost() with proper 'defer' flag. * FCP2 capabilities are only relevant to target devices. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Correct use-after-free oops seen during EH-abort.Giridhar Malavali2-1/+31
Hold a reference to the srb (sp) while aborting an I/O -- as the I/O can/will complete from within the interrupt-context. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Fix cpu-affinity usage for non-capable ISPs.Giridhar Malavali1-4/+4
The TMFs used for pre-24xx ISPs incorrectly assumed 'cpu' tag data could be valid. These chips have no multi-q/cpu-affinity support. This corrects an oops seen on ISP23xx parts. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Add portid to async-request messages.Andrew Vasquez2-16/+31
This helps to correlate submission/completion messages during triaging. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] qla2xxx: Clear drive active CRB register when not in use.Giridhar Malavali6-5/+13
The CRB drive active register is cleared when driver is unloaded or when driver enters failed state. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] hpsa: add entry to MAINTAINERSStephen M. Cameron1-0/+8
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] hpsa: fix block fetch table problem.Stephen M. Cameron1-1/+20
We have 32 (MAXSGENTRIES) scatter gather elements embedded in the command. With all these, the total command size is about 576 bytes. However, the last entry in the block fetch table is 35. (the block fetch table contains the number of 16-byte chunks the firmware needs to fetch for a given number of scatter gather elements.) 35 * 16 = 560 bytes, which isn't enough. It needs to be 36. (36 * 16 == 576) or, MAXSGENTRIES + 4. (plus 4 because there's a bunch of stuff at the front of the command before the first scatter gather element that takes up 4 * 16 bytes.) Without this fix, the controller may have to perform two DMA operations to fetch the command since the first one may not get the whole thing. Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] hpsa: expose controller firmware revision via /sys.Stephen M. Cameron2-0/+27
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>