Received: by 10.213.65.68 with SMTP id h4csp2118009imn; Sun, 8 Apr 2018 20:09:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx48I2eP9QlFxsG5+CMUodzHbWn1LNOeZdebZd3/cVmBHvGqy8GrmnxXVo6c45baz7JT1cNlZ X-Received: by 10.98.163.74 with SMTP id s71mr18514258pfe.72.1523243353830; Sun, 08 Apr 2018 20:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243353; cv=none; d=google.com; s=arc-20160816; b=T1uM57eiAdrtTWUfRQ2cfPuZ42xigTep/mkYlTMYjqQAv4Q1DefpqaIS+DtVPk/EF1 AbhnqOX+WxAi5lIalZkPC+iotjAN7NtkjSRSZNlhYOT0gUT5iX8EsW3rTSG4EFn8KHsV 4svDTPRXD0becg8rdcZg582v/AvmPXENkZhf4Vp73OnVt4e7BM8JXuuy6H3scFr9rgSZ sUsjtY9rgSYK3E9O43Jj1kTaUcMSxJH75NBH3LRX4g7OdpyEuh1v2bI6ACHPU5S4FhAv oDP0a1Kfz0W+lpRAM0IDV6aYLfE5SKBwSeuMPceg2cDJOZaxTlw4jY5c3jeJX1afN1M2 OpGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=lxnAliBChQiboBmgF31wDvNCzZWO8KOYe5Ov5PgIa+U=; b=qoqoWu6uUPvmy95mHK1cV+g6AfFYUaE8bBpWUrSFwWhb1pl6yAfXo4Pj/z7J9Bs5dx EeSQmVzGtmhwoArblgffyy+12CV3y3cCltfdX6Ejtuig4MuMBO3PQZ8nZauy8BOkuNMX 3K2OWaGf2LYxCt/AO0QqqpQ3ctF5cu6VLXo4rukfHtrfjFqTvx1G/ad3xQLqPkFZkmch UodavqD716UOuWim31kjDtUF07acwHELVkpoD9a6x2cbrzn/PqBR889yp+qmL8Zca7fz Cf30vKDSFpixEv89khokd+NNd76BxAPiH0ds5kkjuQDGeiJwPJoRukQKBOQZ4zmWzUjE TtQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NsPzuG/x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u196si10563891pgb.134.2018.04.08.20.08.37; Sun, 08 Apr 2018 20:09:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NsPzuG/x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933108AbeDICZ0 (ORCPT + 99 others); Sun, 8 Apr 2018 22:25:26 -0400 Received: from mail-by2nam03on0120.outbound.protection.outlook.com ([104.47.42.120]:61603 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755019AbeDIA3O (ORCPT ); Sun, 8 Apr 2018 20:29:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lxnAliBChQiboBmgF31wDvNCzZWO8KOYe5Ov5PgIa+U=; b=NsPzuG/xg2uGMuOa1g51Pg1nd17BZFAln7Yh7zSzrwtQy3WzTNKoOu2s/SshZSHGiAWFbDP5FjPKUSXJZ4pHjSduv/VbaQ5gxEjPXqzeQHAiY/AfDc7McL0bVdImxz9zrcFrGR7zzepfqCMmxzhzFGnG6VaoccU2A6LZpTCEhIc= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0967.namprd21.prod.outlook.com (52.132.133.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:29:12 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:29:12 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: James Smart , Dick Kennedy , James Smart , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 097/293] scsi: lpfc: Fix crash after firmware flash when IO is running. Thread-Topic: [PATCH AUTOSEL for 4.9 097/293] scsi: lpfc: Fix crash after firmware flash when IO is running. Thread-Index: AQHTz5kTKzr1TIyWykGulfLJrlX74w== Date: Mon, 9 Apr 2018 00:24:09 +0000 Message-ID: <20180409002239.163177-97-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0967;7:7OZmjCrIdXF/pt1blM3lKCrLE3DYJ4jVtPMZ1L6bRJrbCVtm+yeYK/+rg6HCBGmzEAmwjJ+I0z+Hpe3XT17adXR/+q9J2RivDt565HDL6wHzwwDM0CNtDmuBwz+lgwmZ2X0Dl51q4WRYPwlHSjpAqoaj2UK9JE1vk+Qf+KHsCfq2Bvp9hqQBmWZmODkCSNW2cbmQFb0qA7Usik5cB6NFYup2K0V6NlARLpLu/R0HeKoeEExASblvyJpL21QXK8sZ;20:0GaYvngQlbUyKDHSGDMY9xYLBmDyfXmHESWiPlkZG2DCqreHUSxUTKzfWT/vvuXX6vXNDFt25ERZpoeK2Teihe1zC4pRZjeKZgXjG8pdW/3qzjhpG46DhzQHgRaeBy+BPzeWf2rAr2F8pCLgaviaTS3GUZgC72GxfPwbiJeioFY= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 983195da-8658-4f11-ab47-08d59db0eac8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0967; x-ms-traffictypediagnostic: DM5PR2101MB0967: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0967;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0967; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(376002)(39380400002)(346002)(199004)(189003)(6506007)(486006)(86362001)(14454004)(59450400001)(68736007)(102836004)(99286004)(26005)(3846002)(6116002)(186003)(476003)(2616005)(1076002)(3280700002)(86612001)(72206003)(4326008)(446003)(54906003)(76176011)(11346002)(2906002)(22452003)(3660700001)(110136005)(97736004)(316002)(6666003)(5660300001)(478600001)(8676002)(6512007)(8936002)(39060400002)(107886003)(6486002)(53936002)(81166006)(36756003)(81156014)(10290500003)(6436002)(10090500001)(25786009)(66066001)(106356001)(305945005)(7736002)(2501003)(5250100002)(105586002)(2900100001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0967;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: NAXG31vaK3WLO4LqA1gj4nr+jDaKGYvsocaI55Haf9VLZ+Vm44BzLiOjQh8Dh7ONndE3YVHgvCcqJledfLbh7AdMnGtY2EdlNF4AQoeDRbLjYZqgxDVVLH4w5Y+Ji47gy6WbTgpg2DsQL1ON8xerZCTvRGKuRMZjWxGISGDbt+xrj67KWV42RbuTEMbW7so2C4ZdvmVfHVyLaCy7LJLJ0+0LoX4vbiZ2me+FbN8xb9BWKAtzhCwPg6D537i0Qwmd5Y3UZciAGi9WBKJ1MHy+dQF5TFDaeCledwLo0YoBxKpmXX4ZZVK624eGWNj3AQBxxcdl3Kdrm5JlsKAHtCIqC59gr3yc0XK0sThKZ3rQzqBlv9Lg6mpu47HJtbZ8iLGN1bzmgSk60dTfwuZsZSC6YJyjQVXTd3UkrErBhgv61lc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 983195da-8658-4f11-ab47-08d59db0eac8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:09.6437 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0967 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit 569dbe84a3e769009aa4a5d1030d000168889580 ] OS crashes after the completion of firmware download. Failure in posting SCSI SGL buffers because number of SGL buffers is less than total count. Some of the pending IOs are not completed by driver. SGL buffers for these IOs are not added back to the list. Pending IOs are not completed because lpfc_wq_list list is initialized before completion of pending IOs. Postpone lpfc_wq_list reinitialization by moving lpfc_sli4_queue_destroy() after lpfc_hba_down_post(). Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 0902ed204ba8..bd4ac433047c 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -4130,7 +4130,6 @@ lpfc_sli4_brdreset(struct lpfc_hba *phba) =20 /* Perform FCoE PCI function reset before freeing queue memory */ rc =3D lpfc_pci_function_reset(phba); - lpfc_sli4_queue_destroy(phba); =20 /* Restore PCI cmd register */ pci_write_config_word(phba->pcidev, PCI_COMMAND, cfg_value); @@ -4253,6 +4252,7 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba) pci_disable_pcie_error_reporting(phba->pcidev); =20 lpfc_hba_down_post(phba); + lpfc_sli4_queue_destroy(phba); =20 return rc; } --=20 2.15.1