From patchwork Wed Nov 11 20:24:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 11898491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFCC7697 for ; Wed, 11 Nov 2020 20:24:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90032208B8 for ; Wed, 11 Nov 2020 20:24:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="eWaBNKCz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbgKKUYl (ORCPT ); Wed, 11 Nov 2020 15:24:41 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:2470 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgKKUYl (ORCPT ); Wed, 11 Nov 2020 15:24:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1605126280; x=1636662280; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QIO4Dl1nqCOI2HNhvcJRK4KIpK1xjWxZMWuxV/nGJno=; b=eWaBNKCzAweZxa7Y4k9i4l3CChnsaf0oY/iFwK+qPFsxeEEylPNBK9ld W4mkE81EmuJWH2qmcZBJtxZQZv0Di6N4QmuAiVdomiPe26dPrlHNZX+sw GsZfDZXApHLxlEIha7vkeoaeEMzaQbZ72RAidNDeWEDRyPBa7e77eFp1G DvJxUJL6KkPw7vsIUh/Pr6lUr5foXzYbgmVtRTvZoTdwhGrwe+ex4OFmy 19OfPCLWI8ZrzrU70C8jMCqrA07TYYEdDL4oPEGu5+gaH6VFc6dft1mmJ uPbujeyi4ztHAdwdlOPbVDwgnl4Ax9WgLaj9TnwShZ7AFgeeqe5AtUYph A==; IronPort-SDR: VkT9Z/oOVeSjwWjE30IUG09sXM+VIqEezw4GY4ernqLOS1oJHWSiuRG697gccJehJ35Y/WouSF uFNVWvT4QdYgAhAVb8Ep/33d6fDhfGd2xkvmY3kzJt/ofm8wDG6T8fAz9tpfCIbNwLlZL22dwU pYYSk37YQ9YaW1MMVcRyhwckZhg/0dqp7Ul/4f7muyDiWgwefppMY2SvW44+ERWG6ZpzpFRIc1 F/418hIFADCinHMhuTotTXBg3GqJANVZWDXVBf4mCgIptV1uS3vGkq96QadDThcMgZpXuLxZLg yG8= X-IronPort-AV: E=Sophos;i="5.77,470,1596524400"; d="scan'208";a="95973052" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2020 13:24:40 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 11 Nov 2020 13:24:39 -0700 Received: from [127.0.1.1] (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Wed, 11 Nov 2020 13:24:39 -0700 Subject: [PATCH 1/3] smartpqi: correct driver removal with HBA disks From: Don Brace To: , , , , , , , , , CC: Date: Wed, 11 Nov 2020 14:24:39 -0600 Message-ID: <160512627928.2359.10698615071827614781.stgit@brunhilda> In-Reply-To: <160512621964.2359.14416010917893813538.stgit@brunhilda> References: <160512621964.2359.14416010917893813538.stgit@brunhilda> User-Agent: StGit/0.23-dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Don Brace * Correct rmmod hangs when using HBA disks with write cache enabled. Do not set controller flag "in_shutdown" during rmmod. * SCSI SYNCHRONIZE CACHE(10) and SCSI SYNCHRONIZE CACHE(16) requests were blocked with SCSI_MLQUEUE_HOST_BUSY. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 9d0229656681..531f10853f03 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -345,10 +345,9 @@ static inline void pqi_device_remove_start(struct pqi_scsi_dev *device) device->in_remove = true; } -static inline bool pqi_device_in_remove(struct pqi_ctrl_info *ctrl_info, - struct pqi_scsi_dev *device) +static inline bool pqi_device_in_remove(struct pqi_scsi_dev *device) { - return device->in_remove && !ctrl_info->in_shutdown; + return device->in_remove; } static inline void pqi_ctrl_shutdown_start(struct pqi_ctrl_info *ctrl_info) @@ -5347,8 +5346,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, atomic_inc(&device->scsi_cmds_outstanding); - if (pqi_ctrl_offline(ctrl_info) || pqi_device_in_remove(ctrl_info, - device)) { + if (pqi_ctrl_offline(ctrl_info) || pqi_device_in_remove(device)) { set_host_byte(scmd, DID_NO_CONNECT); pqi_scsi_done(scmd); return 0; @@ -8031,8 +8029,6 @@ static void pqi_pci_remove(struct pci_dev *pci_dev) if (!ctrl_info) return; - ctrl_info->in_shutdown = true; - pqi_remove_ctrl(ctrl_info); } From patchwork Wed Nov 11 20:24:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 11898493 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7769E921 for ; Wed, 11 Nov 2020 20:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F2F2208B8 for ; Wed, 11 Nov 2020 20:24:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="leJ1ABuz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbgKKUYr (ORCPT ); Wed, 11 Nov 2020 15:24:47 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:2494 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgKKUYq (ORCPT ); Wed, 11 Nov 2020 15:24:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1605126286; x=1636662286; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JZmFey4VTyrg425p+Yq/NOszyFTMm1vadxAGXKIOoI4=; b=leJ1ABuzRA0BFjLcjnmEmwlix6ymmusVIwy5YQHbrDIfR+OQ4toGST8J w3Ou9oypS6oPm+yQM6btxvNIhM45Tm7iccLhyTJSML6lYHBDJ1WVhQjN2 /VozQicUmi3oFX8c1vE/irNR+slQzWx0Cpq7LUW0VuaKjtVue8wob46NJ XX0PRo+WAk6Cdf3ssemeq4dj2fNYnZ28n5xBVOXXDtqGpKWGngR4RIUt1 x28Dw3SLQrsNNY+jb1aSFkQQIQUhX3HfTxDJT0vsx89+xifmgcB2Ls/s0 zPuBLFkDduPD9blNjNydN+eLVyKv4rB9JGF448B6sYQUURGCeJR2Nt18x Q==; IronPort-SDR: +euQhbRwSTCxZT5gc90qPevjFpf+7AsRyQZ/WPGgmB6PGHtqXQodqSyhDqUsfP3/YRRKb0MoJL laHkME3Qtb7WVEERkQUAO1YXMuPbKYIJ6e3QR9b+hlnjeo6pg98dqh/YxoopBF7dhpEHf54I1T IMyqJxWRzAxs6An7vgKuDpfV9WRN/7aNN0r3OXO93+4ZBU7QlLq96a6QOlBBq/nQp4fD2ILw68 ra76dMyYkgcqOVZqr6h+nukpXdDbCEErDpRIl+bY0fSGndSyEBWNfEGlPJL5QFf8Y8AHPrY8j1 ZoI= X-IronPort-AV: E=Sophos;i="5.77,470,1596524400"; d="scan'208";a="95973091" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2020 13:24:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 11 Nov 2020 13:24:45 -0700 Received: from [127.0.1.1] (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Wed, 11 Nov 2020 13:24:45 -0700 Subject: [PATCH 2/3] smartpqi: correct pqi_sas_smp_handler busy condition From: Don Brace To: , , , , , , , , , CC: Date: Wed, 11 Nov 2020 14:24:45 -0600 Message-ID: <160512628513.2359.17193493825283879603.stgit@brunhilda> In-Reply-To: <160512621964.2359.14416010917893813538.stgit@brunhilda> References: <160512621964.2359.14416010917893813538.stgit@brunhilda> User-Agent: StGit/0.23-dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org * Remove unbalanced call to pqi_ctrl_unbusy. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_sas_transport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/smartpqi/smartpqi_sas_transport.c b/drivers/scsi/smartpqi/smartpqi_sas_transport.c index 999870eb9ed8..c9b00b3368d7 100644 --- a/drivers/scsi/smartpqi/smartpqi_sas_transport.c +++ b/drivers/scsi/smartpqi/smartpqi_sas_transport.c @@ -549,7 +549,6 @@ void pqi_sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, reslen = pqi_build_sas_smp_handler_reply(smp_buf, job, &error_info); out: bsg_job_done(job, rc, reslen); - pqi_ctrl_unbusy(ctrl_info); } struct sas_function_template pqi_sas_transport_functions = { .get_linkerrors = pqi_sas_get_linkerrors, From patchwork Wed Nov 11 20:24:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 11898495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C3C2697 for ; Wed, 11 Nov 2020 20:24:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD1B8208B8 for ; Wed, 11 Nov 2020 20:24:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="deHglWKY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbgKKUYx (ORCPT ); Wed, 11 Nov 2020 15:24:53 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:2511 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgKKUYx (ORCPT ); Wed, 11 Nov 2020 15:24:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1605126293; x=1636662293; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GQofUBLUsWkSgQyTw9klXT9p2mQAM03JalPVTufkWUw=; b=deHglWKYAdVR5qnak09wUROsmXknWulKn/tvspjIdGfhnEPb0PnT5aYB rVFxLVpNpF0RVGEBN3+khlSMScwt/f2KzABCzvv6JFrWJITcM7ZUgHPKU /PptC5F7ktgq4d1nEcArIhQ+gvYSfVonhtAfZdp6sdqj7Xc50Zi/n46i6 yZiV/WE7b+L2W4r0mfOAPD7htEalU4gHZ3cEbgb2ShZ9DqoRjzkd5ZWy+ kK3m9F0nJi2nk1Augd0bONAVkSOLSR7R2kafvxfXx4LGe039P7BDHo10q MGC23Xo/MHsWSGCRlkj/2Rekh1HGsHBICV9GJW2aojBSlG9zderY+U3rK Q==; IronPort-SDR: ZTaVC6g5zd0pFaI3Tlr7RbKVfCHb8VXk6p3TGE38aY/V1uTbWMdLkYsGDtnhCEX+P2oXmgQx5e 12DORfQp6AvlIMoejFIDLSIi5fhvmOM9G0gOOdLoz59xBIZf89wf18/YS+0+SXYOCSW7WtovGW c4aP4qotNKIkmCUujEQD7WUe30sOuJJaa3Ve8Lppselo281gBIXzvBt1R6mP29C+Pz9YZlWCX5 IEZgpgzLcZBEdO/ToXSFK/tjH1TzG4Vm4Uib09HKt6/PUezBIQ6vupabIQCqdvefj8o8fB+h7f JrQ= X-IronPort-AV: E=Sophos;i="5.77,470,1596524400"; d="scan'208";a="95973131" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2020 13:24:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 11 Nov 2020 13:24:51 -0700 Received: from [127.0.1.1] (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Wed, 11 Nov 2020 13:24:51 -0700 Subject: [PATCH 3/3] smartpqi: update version to 1.2.16-012 From: Don Brace To: , , , , , , , , , CC: Date: Wed, 11 Nov 2020 14:24:50 -0600 Message-ID: <160512629093.2359.13675060282143622110.stgit@brunhilda> In-Reply-To: <160512621964.2359.14416010917893813538.stgit@brunhilda> References: <160512621964.2359.14416010917893813538.stgit@brunhilda> User-Agent: StGit/0.23-dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Gerry Morong Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 531f10853f03..c53f456fbd09 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -33,11 +33,11 @@ #define BUILD_TIMESTAMP #endif -#define DRIVER_VERSION "1.2.16-010" +#define DRIVER_VERSION "1.2.16-012" #define DRIVER_MAJOR 1 #define DRIVER_MINOR 2 #define DRIVER_RELEASE 16 -#define DRIVER_REVISION 10 +#define DRIVER_REVISION 12 #define DRIVER_NAME "Microsemi PQI Driver (v" \ DRIVER_VERSION BUILD_TIMESTAMP ")"