summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames.Smart@Emulex.Com2005-10-29 02:30:02 +0200
committerJames Bottomley2005-10-29 17:31:48 +0200
commit0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb (patch)
tree10ae769505f9f306ea7a312663011e95019c34ef /drivers/scsi/lpfc/lpfc_els.c
parent[SCSI] lpfc: Remove unneeded IOCB_t * cast (diff)
downloadkernel-qcow2-linux-0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb.tar.gz
kernel-qcow2-linux-0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb.tar.xz
kernel-qcow2-linux-0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb.zip
[SCSI] lpfc: Fix eh_ return codes for commands
Return FAILED from eh_ routines if command(s) is(are) not completed There were scenarios where we may have returned from the error handlers prior to all affected commands being flushed to the midlayer. Add changes to ensure this doesn't happen. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index e931ae6e7464..08a0c00cfc30 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -102,9 +102,8 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
uint16_t cmdSize,
uint8_t retry, struct lpfc_nodelist * ndlp, uint32_t elscmd)
{
- struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list;
struct lpfc_sli_ring *pring;
- struct lpfc_iocbq *elsiocb = NULL;
+ struct lpfc_iocbq *elsiocb;
struct lpfc_dmabuf *pcmd, *prsp, *pbuflist;
struct ulp_bde64 *bpl;
IOCB_t *icmd;
@@ -114,10 +113,9 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
if (phba->hba_state < LPFC_LINK_UP)
return NULL;
-
/* Allocate buffer for command iocb */
spin_lock_irq(phba->host->host_lock);
- list_remove_head(lpfc_iocb_list, elsiocb, struct lpfc_iocbq, list);
+ elsiocb = lpfc_sli_get_iocbq(phba);
spin_unlock_irq(phba->host->host_lock);
if (elsiocb == NULL)