From 8aae97baf5176560f032079888a41ace3e141185 Mon Sep 17 00:00:00 2001 From: James Smart Date: Tue, 12 Jun 2012 13:54:11 -0400 Subject: [PATCH] --- yaml --- r: 316767 b: refs/heads/master c: a629852ab810015223eec7a2f31a6bd5f93c83cf h: refs/heads/master i: 316765: bcf576006493e9ae530b73669af2deb3db38aef9 316763: 7635d28149050a6904876b15e4b92b0c33ae2535 316759: d7ecd7f5f6038e4320a22ff3d871997cd6038b22 316751: 0d61e2fb0c553ee623e6c1474902fa35f16e2dca 316735: 3c3867faec67bb12482a067e82c1a51b72c05a68 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 6dc71ff06655..27c11f460f92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4f4c18634d2a05079194ba333c7882349f25d6f7 +refs/heads/master: a629852ab810015223eec7a2f31a6bd5f93c83cf diff --git a/trunk/drivers/scsi/lpfc/lpfc_sli.c b/trunk/drivers/scsi/lpfc/lpfc_sli.c index aace596887e6..3e4f8eaa1fb8 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_sli.c +++ b/trunk/drivers/scsi/lpfc/lpfc_sli.c @@ -15863,24 +15863,18 @@ lpfc_drain_txq(struct lpfc_hba *phba) spin_lock_irqsave(&phba->hbalock, iflags); piocbq = lpfc_sli_ringtx_get(phba, pring); + if (!piocbq) { + spin_unlock_irqrestore(&phba->hbalock, iflags); + lpfc_printf_log(phba, KERN_ERR, LOG_SLI, + "2823 txq empty and txq_cnt is %d\n ", + pring->txq_cnt); + break; + } sglq = __lpfc_sli_get_sglq(phba, piocbq); if (!sglq) { __lpfc_sli_ringtx_put(phba, pring, piocbq); spin_unlock_irqrestore(&phba->hbalock, iflags); break; - } else { - if (!piocbq) { - /* The txq_cnt out of sync. This should - * never happen - */ - sglq = __lpfc_clear_active_sglq(phba, - sglq->sli4_lxritag); - spin_unlock_irqrestore(&phba->hbalock, iflags); - lpfc_printf_log(phba, KERN_ERR, LOG_SLI, - "2823 txq empty and txq_cnt is %d\n ", - pring->txq_cnt); - break; - } } /* The xri and iocb resources secured,