aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-23lpfc: Add lockdep assertionsJohannes Thumshirn1-0/+43
Several functions in lpfc have comments stating that the function must be called with the hbalock (or hostlock, or ringlock) held. Add lockdep_assert_held() annotations to these functions, so one can actually verify the locks are held. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix external loopback failure.James Smart1-2/+13
Fix external loopback failure. Rx sequence reassembly was incorrect. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get.James Smart1-2/+6
Fix FCF Infinite loop in lpfc_sli4_fcf_rr_next_index_get. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-10-27lpfc: remove set but not used variablesSebastian Herbszt1-8/+0
Remove set but not used variables. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27lpfc:Make the function lpfc_sli4_mbox_completions_pending static in order to comply with function prototypeNicholas Krause1-1/+1
This makes the function lpfc_sli4_mbox_completion's definition static now in order to comply with its prototype being also declared as static too. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Sebastian Herbszt <herbszt@gmx.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completesJames Smart1-1/+1
The domain controller PLOGI's concurrent with prior LOGO's/unreg_rpi's completing created a race condition where driver rpi ref count can inadvertantly hit 0 and the rpi attempted to be freed. This error sometimes resulted in Warning messages indicating kref.h via lfpc_nlp_get+0x128. Correct by dropping any new PLOGI until the prior nport state has settled. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Add support for using block multi-queueJames Smart1-51/+23
With blk-mq support in the mid-layer, lpfc can do IO steering based on the information in the request tag. This patch allows lpfc to use blk-mq if enabled. If not enabled, we fall back into the emulex-internal affinity mappings. This feature can be turned on via CONFIG_SCSI_MQ_DEFAULT or passing scsi_mod.use_blk_mq=Y as a parameter to the kernel. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Fix ABORTs WQ selection in terminate_rport_ioJames Smart1-11/+21
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Update copyright to 2015James Smart1-1/+1
Update copyright to 2015 Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix OS crash when running loopback test in applicationsJames Smart1-4/+8
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix premature release of rpi bit in bitmaskJames Smart1-3/+46
Currently, the driver plays off the fact that older sli4 adapters have a different rpi access pattern that allowed for the rpi reference to be released earlier in the teardown sequence, allowing the driver to recycle the rpi value sooner. Newer sli4 adapters have a different access pattern that requires us to wait for a later mailbox completion. This changes the put call location on the newer sli4 adapters. Symptoms of the error are "0110 ELS" and the "0372 iotag" errors. Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix setting of EQ (interrupt) delay MultiplierJames Smart1-6/+3
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2014-09-16lpfc: fix for handling unmapped ndlp in target reset handlerJames Smart1-1/+7
Fix for handling unmapped ndlp in target reset handler Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix low priority issues from fortify source code scanJames Smart1-12/+9
Fixed Low priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix high priority issues from fortify source code scanJames Smart1-13/+13
Fixed High priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix locking issues with abort data pathsJames Smart1-47/+71
Fix locking issues with abort data paths Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix quarantined XRI recovery qualifier state in link bounceJames Smart1-36/+0
Fix quarantined XRI recovery qualifier state in link bounce Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix discovery timeout during nameserver loginJames Smart1-1/+9
Fix discovery timeout during nameserver login Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: use dma_zalloc_coherentJoe Perches1-9/+5
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: James Smart <james.smart@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: mark functions as static in lpfc/lpfc_sli.cRashika Kheria1-7/+7
[PATCH 22/55] scsi: Mark functions as static in lpfc/lpfc_sli.c Mark functions as static in lpfc/lpfc_sli.c because they are not used outside this file. This eliminates the following warnings in lpfc/lpfc_sli.c: drivers/scsi/lpfc/lpfc_sli.c:13867:1: warning: no previous prototype for ‘lpfc_sli4_alloc_xri’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:13897:1: warning: no previous prototype for ‘__lpfc_sli4_free_xri’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:14317:1: warning: no previous prototype for ‘lpfc_update_rcv_time_stamp’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:14786:1: warning: no previous prototype for ‘lpfc_sli4_handle_unsol_abort’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:15331:1: warning: no previous prototype for ‘__lpfc_sli4_free_rpi’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:15769:1: warning: no previous prototype for ‘lpfc_check_next_fcf_pri_level’ [-Wmissing-prototypes] drivers/scsi/lpfc/lpfc_sli.c:16000:1: warning: no previous prototype for ‘lpfc_mbx_cmpl_redisc_fcf_table’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: James Smart <james.smart@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Fix ExpressLane priority setupJames Smart1-0/+1
Fix ExpressLane priority setup Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Fix for cleaning up stale ring flag and sp_queue_event entriesJames Smart1-0/+1
Fix for cleaning up stale ring flag and sp_queue_event entries. Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Update Copyright on changed filesJames Smart1-1/+1
Update Copyright on changed files Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Fixed locking for scsi task management commandsJames Smart1-0/+118
Fixed locking for scsi task management commands. Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Convert runtime references to old xlane cfg param to fof cfg paramJames Smart1-4/+3
Convert runtime references to old xlane cfg param to fof cfg param Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Fix FW dump using sysfsJames Smart1-3/+10
Fix FW dump using sysfs Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lockJames Smart1-62/+93
Fix SLI4 s abort loop to process all FCP rings and under ring_lock Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-05-19lpfc: Add iotag memory barrierJames Smart1-0/+21
Add a memory barrier to ensure the valid bit is read before any of the cqe payload is read. This fixes an issue seen on Power where the cqe payload was getting loaded before the valid bit. When this occurred, we saw an iotag out of range error when a command completed, but since the iotag looked invalid the command didn't get completed to scsi core. Later we hit the command timeout, attempted to abort the command, then waited for the aborted command to get returned. Since the adapter already returned the command, we timeout waiting, and end up escalating EEH all the way to host reset. This patch fixes this issue. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Smart <james.smart@emulex.com> --- lpfc_sli.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-03-15[SCSI] lpfc: use NULL instead of 0 for pointerDaeseok Youn1-1/+1
sparse says: drivers/scsi/lpfc/lpfc_sli.c:16547:37: warning: Using plain integer as NULL pointer Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.45: Fixed crash during driver unload.James Smart1-3/+7
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.45: Incorporated support of a low-latency io pathJames Smart1-11/+230
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.44: Fix kernel panics from corrupted ndlp listJames Smart1-3/+8
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.44: Fixed IO hang when in msi mode.James Smart1-1/+2
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] lpfc 8.3.43: Fixed not processing task management IOCB response statusJames Smart1-0/+5
This patch implements the changes requested by Jeremy Linton: http://marc.info/?l=linux-scsi&m=136242124409687&w=2 The patch revises the command issuing behavior, detecting cases where the Task Mgmt command may have completed but with a non-successful status, which it previously treated as a successful TMF. The patch also corrects a flushing of I/O that was done which should only be done on successful TMF completion. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] lpfc 8.3.43: Fixed invalid Total_Data_Placed value received for els and ct command responsesJames Smart1-2/+36
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] lpfc 8.3.43: Fixed invalid fcp_rsp length fir FCP_ICMNDJames Smart1-5/+14
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] lpfc 8.3.43: Fixed invalid mailbox timeoutsJames Smart1-0/+112
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] lpfc 8.3.43: Fixed spinlock inversion problem.James Smart1-4/+5
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-10[SCSI] lpfc 8.3.42: Fix driver's abort loop functionality to skip IOs already getting abortedJames Smart1-1/+11
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-10[SCSI] lpfc 8.3.42: Avoided making pci bar ioremap call during dual-chute WQ/RQ pci bar selectionJames Smart1-16/+0
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-10[SCSI] lpfc 8.3.42: Fixed using unsafe linked list macro for walking and deleting linked listJames Smart1-2/+3
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Fixed support for 128 byte WQEsJames Smart1-3/+45
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Fixed max value of lpfc_lun_queue_depthJames Smart1-0/+11
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Fixed Receive Queue varied frame size handlingJames Smart1-12/+24
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Fix mailbox byteswap issue on PPCJames Smart1-1/+0
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Fixed freeing of iocb when internal loopback times outJames Smart1-6/+45
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] lpfc 8.3.40: Update Copyrights to 2013 for 8.3.38, 8.3.39, and 8.3.40 modificationsJames Smart1-1/+1
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] lpfc 8.3.40: Fixed issue mailbox wait routine failed to issue dump memory mbox commandJames Smart1-3/+8
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] lpfc 8.3.40: Fixed a missing return code in a logging messageJames Smart1-1/+2
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] lpfc 8.3.40: Fixed some logging message fieldsJames Smart1-2/+2
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>