Received: by 10.213.65.68 with SMTP id h4csp2119742imn; Sun, 8 Apr 2018 20:11:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zqs7I8EjfEuBsk1MbLNgjEoMonM9f1jH8I5jvyC9oMQsxLs9RowCHazvzZn+GujglCbsk X-Received: by 10.99.131.73 with SMTP id h70mr23399942pge.195.1523243404390; Sun, 08 Apr 2018 20:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243404; cv=none; d=google.com; s=arc-20160816; b=fd1v3gH8sg5q/gjuDHzi+/3FQaF3ISgX+WJF8ZyMmD2UemZaP0xQGz66XnbkfpDY56 OBYrWsPMwekM1ypBn5UCvjWiJcDst/VVEbGXS/NcsIK5jnOcu8wAHyqdzqiJqg1VY+id bBUJP1bRsZ2W3lbqjW1asXI9b+ho3rQXHUDhtnfZv6OOrc18zmmG1P98Yh3ixWXiUNu2 loxp5m3mn7BM1ZN3bOd8ogtcpGASU7n4i9b/4U3R1QN2Fg9iBIvafo1ZZMpVbQDXwlLK JEfHcD0nGhPComZI2iT/ZIPxqH4/zvGjPh/gcthSIylpaJs6xF5EE6cYS0v4NADMov1w 1kSQ== 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=S3wE25QI553xxRti3ZHmNtjM2eaMJtxdZr+ynmAqxOU=; b=hOSC12AACtTplS4t8MeIDEQKbcpr8u/ggTksR2FpHP2fJc88+7d/jMYkAlVdtlSCiE gxSRtrH+7a9RbUbCmWexpojBymKtAvUIFMbscl4PB4LBH4VkgAcwIaCZ+kbKoV59OtCg vV/vS5fbux96RqrmIKdOCyJbzP5EvtBir838Qo812Qh/+jfv3J0EZ3gpWP6/GnOtdjR7 4RYYjDXKnFDk/vAR50Gvvtzm7Kf1mTp9OIdbfLtkZhu7AvWG+tIxZJmp439Oi0r24VA0 Q+vGooWfrbqMPlarYIMhxk9+JqgyM4RkGy3XsjLvY7UPZSA/h5YZSn8EtO7Z504tnFIU 78eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=fh2MWpbA; 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 h61-v6si6195049pld.152.2018.04.08.20.09.27; Sun, 08 Apr 2018 20:10:04 -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=fh2MWpbA; 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 S1757372AbeDIB3Q (ORCPT + 99 others); Sun, 8 Apr 2018 21:29:16 -0400 Received: from mail-cys01nam02on0100.outbound.protection.outlook.com ([104.47.37.100]:40736 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756655AbeDIAgB (ORCPT ); Sun, 8 Apr 2018 20:36:01 -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=S3wE25QI553xxRti3ZHmNtjM2eaMJtxdZr+ynmAqxOU=; b=fh2MWpbAJS/6k7OC3Knv6wZEykwU2EKzs3/srPIhgrWfv1o983t3KmmGCen/7PCUHRt5XvjAklTushfCT6NUXJQYqUvClve1MOIOmYzEepy/ZuVfAbFAnHEsmqAxAyU7tElNknx0mhzKkCmbq5zGx4RujanWR9QzbEcE0wsCSUY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) 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:35:58 +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:35:58 +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.4 049/162] scsi: lpfc: Fix crash after firmware flash when IO is running. Thread-Topic: [PATCH AUTOSEL for 4.4 049/162] scsi: lpfc: Fix crash after firmware flash when IO is running. Thread-Index: AQHTz5moViUME33gu0GyzHTla0uLyQ== Date: Mon, 9 Apr 2018 00:28:18 +0000 Message-ID: <20180409002738.163941-49-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB1015;7:bC690SsjyIorNlLadFICvjOilwB+lhxoKvwtT6k+V78e3sV3vr0IN7BIAUGgSHAcEdvmZl0VxIvTbXwdTRY8XbNQhWClyd3dkNHKabyejxTMAuRJ4yVCcO8dI9dyeXMe2A2eLaBxU6aNuocGtN/Uvur+qN/BGQ8KU4QSm6qndNmtkbIw7cVnQ/MK2u76f8zO3OxaOd9R9eLF4GA5aqiazy4S4gt7tCc23+U/CjlgE2v1u/KZVkEMZpuep8VjTWot;20:mydeH3sXE0X919pzL+/kezzDMJn2YHdIaM4MMOAs/t0wBsHLcqoGkY8cdIq5kTtgIIaDPzbmggU9WLINR8PtxV5vkB2zi9aEXONMxI6udOI9p4bRJuuDH9RJEk8fkQNgTBpmcMawpjm6/rC7AXXnWW//aOy+eU6sl7PIqhvBHjI= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: d79b603d-0478-4e74-3300-08d59db1dd1a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: 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)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(39380400002)(376002)(346002)(366004)(189003)(199004)(53936002)(4326008)(478600001)(72206003)(3280700002)(2616005)(14454004)(305945005)(5250100002)(3660700001)(2501003)(2900100001)(54906003)(110136005)(86362001)(1076002)(107886003)(6506007)(36756003)(446003)(68736007)(6512007)(7736002)(486006)(2906002)(5660300001)(6436002)(3846002)(86612001)(6486002)(66066001)(11346002)(476003)(6666003)(59450400001)(26005)(10090500001)(316002)(22452003)(8676002)(81156014)(81166006)(6116002)(105586002)(99286004)(186003)(106356001)(76176011)(39060400002)(25786009)(97736004)(10290500003)(102836004)(8936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: k6wosZ9Mfwrf4o5F0DFlzhunlWGN/kvFpKqwjWWXc2tf88/o4H0dUfjetGxya879NMYtxQ28Jrcu/TFJxTWpH8CBeYE7JaxUI3Hb/Spe+bt/7MQy2rsDh02ITbCOOJSnO5bY4JIuSolIKVzGxaejxXWDNQNUvI85XAEsntqQKEhQtLuWbFKjIjWO1k/a3JqhA9FbPVmhXnBm0stdjzjPXikd/gcBe3y4fVNrACBZhC31FKPHQlOnduFMq5JVvkP1x3wnvuK1ZtgC66pPukN6p7hsCVTQV9JMW1gO3blGcDZVdRU1mZcBYFaaKAh+9BdI4wnhL1byHptwxBoqQwEjQCSeOMdSXAnFugrMECaUdKDyzCTQXQmD0aOD/g5OOTh1g9OuG4xip3ONGRUNUzXj9KWw6WNXUD93WW84VO2yrEE= 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: d79b603d-0478-4e74-3300-08d59db1dd1a X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:18.0518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 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 ef43847153ea..f31ad4f5c7e5 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -4101,7 +4101,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); @@ -4224,6 +4223,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