Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3653656pxb; Tue, 19 Apr 2022 07:19:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+56DfPSYwXOP7p6FW3lb9kx1bZkUJlAXzuVL2bojauUkxIYSje0MSEkX/PpQYww3Anye X-Received: by 2002:a62:a50b:0:b0:4f7:4457:a48a with SMTP id v11-20020a62a50b000000b004f74457a48amr17912745pfm.50.1650377987962; Tue, 19 Apr 2022 07:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650377987; cv=none; d=google.com; s=arc-20160816; b=SS4zc7GHEKMLHgAkuRwRmzlKOsJ56swW1zTJvxCtWK8bVZmdls8KL+4cjxTn2d0gBZ FZnsfFRXv44SS+6fMKhit6sKgBa6Aq/VaKbEpsmUB89ieNxo8etfYnH07o6cLCynHzri 7VmWb48aewLpBBY3ZMhUFwovMdqIIUwlTTqIsGvoe5ezV7FSQn6gY2SOGH0cbDd0wdsn ayxtPCQ95W77vIZaXkZxS2qHClMSfOPzXVjICSCuwLC7ffdQSph3mgDUK8E21qv9VXJM ge8ZEI8HK30p8Fv1u5gx1xjevBPBDxHQ2njPJh9T0TMef43moI2Uo9pP4E1SCM23bLJD bC5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pjMi5SuuL78Xq3PrPgfEkzPBqkuyynYV4JucRnmC0CU=; b=cncLx+wlvfb3gSg6fshVrmBKoOXXxd67Y4jUtMLm37DHDDcZ/3698YD6fffgdQ1Ez2 QOFudyoDI9yC8rqngYUR4U2uXYsqTHbJDasxJBuJtQrtUFW4M6wItvSYLKYqu7Ebh+9M cpG4WiUleYA3rzFN5rAj4sStljIaJ+4DrlnLoH72ep1NL749zHDgQMswLvsf1TGxVLq3 vEUDThZLpFkjwVBsyWV+QiR095lzg8T3Zndg+5UEzmq3QNOzXLDxizRqIjH5JcxcUCBd qhW3j6+ZEfh2OSBKtm8mVL23GFE1TnIBzz26wg73fWNTP4OqfH3wIlLVgijbuitMSECj bp9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G041+z82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i69-20020a639d48000000b0039f462590b6si12087808pgd.665.2022.04.19.07.19.30; Tue, 19 Apr 2022 07:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G041+z82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239025AbiDRMcR (ORCPT + 99 others); Mon, 18 Apr 2022 08:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239659AbiDRM2j (ORCPT ); Mon, 18 Apr 2022 08:28:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3FF0220D5; Mon, 18 Apr 2022 05:22:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 14AA560FAC; Mon, 18 Apr 2022 12:22:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0826EC385A1; Mon, 18 Apr 2022 12:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284536; bh=96MyTFeUkLFFOgfR7cfAs1rXUZMNhiPDiCmVNh0AGgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G041+z82JhWWd3XphFwgdh8l+qaK2CRSgT851RCtOlB2S7kmFucTXMRDorerpVZfw +KleFaHCDx329uB2vrCCPGUi5mJ45R00/5Nfg2hvxqKEJJbVUTWtvQ6WHp8c0hl8qd j2SrXiM7QXAPidtzGNBlqIoWfm2sXyR7GzV2UoeQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Justin Tee , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.17 148/219] scsi: lpfc: Fix queue failures when recovering from PCI parity error Date: Mon, 18 Apr 2022 14:11:57 +0200 Message-Id: <20220418121211.031290580@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit df0101197c4d9596682901631f3ee193ed354873 ] When recovering from a pci-parity error the driver is failing to re-create queues, causing recovery to fail. Looking deeper, it was found that the interrupt vector count allocated on the recovery was 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(). Link: https://lore.kernel.org/r/20220317032737.45308-4-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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 c8c049cf8d96..9569a7390f9d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -15248,6 +15248,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.35.1