All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <jsmart2021@gmail.com>, Justin Tee <justin.tee@broadcom.com>
Subject: [PATCH 3/4] lpfc: Fix queue failures when recovering from PCI parity error
Date: Wed, 16 Mar 2022 20:27:36 -0700	[thread overview]
Message-ID: <20220317032737.45308-4-jsmart2021@gmail.com> (raw)
In-Reply-To: <20220317032737.45308-1-jsmart2021@gmail.com>

When recovering from a pci-parity error the driver is failing to
re-create queues, causing recovery to fail. Looking deeper, it was
found tha the interrupt vector count allocated on the recovery is
fewer than the vectors originally allocated. This disparity resulted
in cpu map entries with stale information. When the driver tries to
re-create the queues, it attempts to use the stale information which
indicates an eq/interrupt vector that was no longer created.

Fix by clearng the cpup map array before enabling and requesting the
irqs in the lpfc_sli_reset_slot_s4 routine.

Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index cf83bc0e27c0..461d333b1b3a 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -15236,6 +15236,8 @@ lpfc_io_slot_reset_s4(struct pci_dev *pdev)
 	psli->sli_flag &= ~LPFC_SLI_ACTIVE;
 	spin_unlock_irq(&phba->hbalock);
 
+	/* Init cpu_map array */
+	lpfc_cpu_map_array_init(phba);
 	/* Configure and enable interrupt */
 	intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode);
 	if (intr_mode == LPFC_INTR_ERROR) {
-- 
2.26.2


  parent reply	other threads:[~2022-03-17  3:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17  3:27 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.1 James Smart
2022-03-17  3:27 ` [PATCH 1/4] lpfc: Improve PCI EEH Error and Recovery Handling James Smart
2022-03-17  3:27 ` [PATCH 2/4] lpfc: Fix unload hang after back to back PCI EEH faults James Smart
2022-03-17  3:27 ` James Smart [this message]
2022-03-17  3:27 ` [PATCH 4/4] lpfc: Update lpfc version to 14.2.0.1 James Smart
2022-03-30  3:20 ` [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.1 Martin K. Petersen
2022-04-07 13:35 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220317032737.45308-4-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=justin.tee@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.