aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2013-05-31 17:04:19 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-06-26 13:48:45 -0400
commit398d81c9ff6b8754b4dbfc21d564d90b3b6d470b (patch)
treebed24a2eb5102313fa1a6ed7889c7858e4f669b8 /drivers/scsi/lpfc
parente85d8f9f62ef5f20a980f3627b07290243daa310 (diff)
[SCSI] lpfc 8.3.40: Fixed list corruption when lpfc_drain_tx runs.
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 2e86ac0d5433..a36a8c7c0a3e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -16286,7 +16286,7 @@ lpfc_drain_txq(struct lpfc_hba *phba)
16286 union lpfc_wqe wqe; 16286 union lpfc_wqe wqe;
16287 int txq_cnt = 0; 16287 int txq_cnt = 0;
16288 16288
16289 spin_lock_irqsave(&phba->hbalock, iflags); 16289 spin_lock_irqsave(&pring->ring_lock, iflags);
16290 list_for_each_entry(piocbq, &pring->txq, list) { 16290 list_for_each_entry(piocbq, &pring->txq, list) {
16291 txq_cnt++; 16291 txq_cnt++;
16292 } 16292 }
@@ -16294,14 +16294,14 @@ lpfc_drain_txq(struct lpfc_hba *phba)
16294 if (txq_cnt > pring->txq_max) 16294 if (txq_cnt > pring->txq_max)
16295 pring->txq_max = txq_cnt; 16295 pring->txq_max = txq_cnt;
16296 16296
16297 spin_unlock_irqrestore(&phba->hbalock, iflags); 16297 spin_unlock_irqrestore(&pring->ring_lock, iflags);
16298 16298
16299 while (!list_empty(&pring->txq)) { 16299 while (!list_empty(&pring->txq)) {
16300 spin_lock_irqsave(&phba->hbalock, iflags); 16300 spin_lock_irqsave(&pring->ring_lock, iflags);
16301 16301
16302 piocbq = lpfc_sli_ringtx_get(phba, pring); 16302 piocbq = lpfc_sli_ringtx_get(phba, pring);
16303 if (!piocbq) { 16303 if (!piocbq) {
16304 spin_unlock_irqrestore(&phba->hbalock, iflags); 16304 spin_unlock_irqrestore(&pring->ring_lock, iflags);
16305 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 16305 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
16306 "2823 txq empty and txq_cnt is %d\n ", 16306 "2823 txq empty and txq_cnt is %d\n ",
16307 txq_cnt); 16307 txq_cnt);
@@ -16310,7 +16310,7 @@ lpfc_drain_txq(struct lpfc_hba *phba)
16310 sglq = __lpfc_sli_get_sglq(phba, piocbq); 16310 sglq = __lpfc_sli_get_sglq(phba, piocbq);
16311 if (!sglq) { 16311 if (!sglq) {
16312 __lpfc_sli_ringtx_put(phba, pring, piocbq); 16312 __lpfc_sli_ringtx_put(phba, pring, piocbq);
16313 spin_unlock_irqrestore(&phba->hbalock, iflags); 16313 spin_unlock_irqrestore(&pring->ring_lock, iflags);
16314 break; 16314 break;
16315 } 16315 }
16316 txq_cnt--; 16316 txq_cnt--;
@@ -16338,7 +16338,7 @@ lpfc_drain_txq(struct lpfc_hba *phba)
16338 piocbq->iotag, piocbq->sli4_xritag); 16338 piocbq->iotag, piocbq->sli4_xritag);
16339 list_add_tail(&piocbq->list, &completions); 16339 list_add_tail(&piocbq->list, &completions);
16340 } 16340 }
16341 spin_unlock_irqrestore(&phba->hbalock, iflags); 16341 spin_unlock_irqrestore(&pring->ring_lock, iflags);
16342 } 16342 }
16343 16343
16344 /* Cancel all the IOCBs that cannot be issued */ 16344 /* Cancel all the IOCBs that cannot be issued */