diff options
author | James Smart <james.smart@emulex.com> | 2010-06-07 15:24:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:34 -0400 |
commit | 2a9bf3d011303d8da64cd5e0e7fdd95f0c143984 (patch) | |
tree | fbec390538ff91adb0bee7116b3627524134db01 /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 98fc5dd952ecfd3abff7c06e7a55a5eab4dd95b7 (diff) |
[SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.
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>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 9810b3d3cc53..bccc9c66fa37 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -190,6 +190,7 @@ lpfc_check_elscmpl_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
190 | } | 190 | } |
191 | 191 | ||
192 | 192 | ||
193 | |||
193 | /* | 194 | /* |
194 | * Free resources / clean up outstanding I/Os | 195 | * Free resources / clean up outstanding I/Os |
195 | * associated with a LPFC_NODELIST entry. This | 196 | * associated with a LPFC_NODELIST entry. This |
@@ -199,13 +200,15 @@ int | |||
199 | lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | 200 | lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) |
200 | { | 201 | { |
201 | LIST_HEAD(completions); | 202 | LIST_HEAD(completions); |
203 | LIST_HEAD(txcmplq_completions); | ||
204 | LIST_HEAD(abort_list); | ||
202 | struct lpfc_sli *psli = &phba->sli; | 205 | struct lpfc_sli *psli = &phba->sli; |
203 | struct lpfc_sli_ring *pring = &psli->ring[LPFC_ELS_RING]; | 206 | struct lpfc_sli_ring *pring = &psli->ring[LPFC_ELS_RING]; |
204 | struct lpfc_iocbq *iocb, *next_iocb; | 207 | struct lpfc_iocbq *iocb, *next_iocb; |
205 | 208 | ||
206 | /* Abort outstanding I/O on NPort <nlp_DID> */ | 209 | /* Abort outstanding I/O on NPort <nlp_DID> */ |
207 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_DISCOVERY, | 210 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_DISCOVERY, |
208 | "0205 Abort outstanding I/O on NPort x%x " | 211 | "2819 Abort outstanding I/O on NPort x%x " |
209 | "Data: x%x x%x x%x\n", | 212 | "Data: x%x x%x x%x\n", |
210 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, | 213 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
211 | ndlp->nlp_rpi); | 214 | ndlp->nlp_rpi); |
@@ -224,14 +227,25 @@ lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | |||
224 | } | 227 | } |
225 | 228 | ||
226 | /* Next check the txcmplq */ | 229 | /* Next check the txcmplq */ |
227 | list_for_each_entry_safe(iocb, next_iocb, &pring->txcmplq, list) { | 230 | list_splice_init(&pring->txcmplq, &txcmplq_completions); |
231 | spin_unlock_irq(&phba->hbalock); | ||
232 | |||
233 | list_for_each_entry_safe(iocb, next_iocb, &txcmplq_completions, list) { | ||
228 | /* Check to see if iocb matches the nport we are looking for */ | 234 | /* Check to see if iocb matches the nport we are looking for */ |
229 | if (lpfc_check_sli_ndlp(phba, pring, iocb, ndlp)) { | 235 | if (lpfc_check_sli_ndlp(phba, pring, iocb, ndlp)) |
230 | lpfc_sli_issue_abort_iotag(phba, pring, iocb); | 236 | list_add_tail(&iocb->dlist, &abort_list); |
231 | } | ||
232 | } | 237 | } |
238 | spin_lock_irq(&phba->hbalock); | ||
239 | list_splice(&txcmplq_completions, &pring->txcmplq); | ||
233 | spin_unlock_irq(&phba->hbalock); | 240 | spin_unlock_irq(&phba->hbalock); |
234 | 241 | ||
242 | list_for_each_entry_safe(iocb, next_iocb, &abort_list, dlist) { | ||
243 | spin_lock_irq(&phba->hbalock); | ||
244 | list_del_init(&iocb->dlist); | ||
245 | lpfc_sli_issue_abort_iotag(phba, pring, iocb); | ||
246 | spin_unlock_irq(&phba->hbalock); | ||
247 | } | ||
248 | |||
235 | /* Cancel all the IOCBs from the completions list */ | 249 | /* Cancel all the IOCBs from the completions list */ |
236 | lpfc_sli_cancel_iocbs(phba, &completions, IOSTAT_LOCAL_REJECT, | 250 | lpfc_sli_cancel_iocbs(phba, &completions, IOSTAT_LOCAL_REJECT, |
237 | IOERR_SLI_ABORTED); | 251 | IOERR_SLI_ABORTED); |