aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>2005-10-28 20:30:02 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-29 11:31:48 -0400
commit0bd4ca25ad2ace4aa717c83dbd4ed21c53c953cb (patch)
tree10ae769505f9f306ea7a312663011e95019c34ef /drivers/scsi/lpfc/lpfc_els.c
parent4a0dfcdefb1cc81c0920dc98fbb82bb57326b16d (diff)
[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,
102 uint16_t cmdSize, 102 uint16_t cmdSize,
103 uint8_t retry, struct lpfc_nodelist * ndlp, uint32_t elscmd) 103 uint8_t retry, struct lpfc_nodelist * ndlp, uint32_t elscmd)
104{ 104{
105 struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list;
106 struct lpfc_sli_ring *pring; 105 struct lpfc_sli_ring *pring;
107 struct lpfc_iocbq *elsiocb = NULL; 106 struct lpfc_iocbq *elsiocb;
108 struct lpfc_dmabuf *pcmd, *prsp, *pbuflist; 107 struct lpfc_dmabuf *pcmd, *prsp, *pbuflist;
109 struct ulp_bde64 *bpl; 108 struct ulp_bde64 *bpl;
110 IOCB_t *icmd; 109 IOCB_t *icmd;
@@ -114,10 +113,9 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba,
114 if (phba->hba_state < LPFC_LINK_UP) 113 if (phba->hba_state < LPFC_LINK_UP)
115 return NULL; 114 return NULL;
116 115
117
118 /* Allocate buffer for command iocb */ 116 /* Allocate buffer for command iocb */
119 spin_lock_irq(phba->host->host_lock); 117 spin_lock_irq(phba->host->host_lock);
120 list_remove_head(lpfc_iocb_list, elsiocb, struct lpfc_iocbq, list); 118 elsiocb = lpfc_sli_get_iocbq(phba);
121 spin_unlock_irq(phba->host->host_lock); 119 spin_unlock_irq(phba->host->host_lock);
122 120
123 if (elsiocb == NULL) 121 if (elsiocb == NULL)