From patchwork Sat Apr 21 02:04:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Gill X-Patchwork-Id: 10353939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1A40604D3 for ; Sat, 21 Apr 2018 02:19:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C35C1287AA for ; Sat, 21 Apr 2018 02:19:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B401F287A6; Sat, 21 Apr 2018 02:19:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A39D287A6 for ; Sat, 21 Apr 2018 02:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbeDUCTt (ORCPT ); Fri, 20 Apr 2018 22:19:49 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:6019 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752243AbeDUCTs (ORCPT ); Fri, 20 Apr 2018 22:19:48 -0400 X-Greylist: delayed 901 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Apr 2018 22:19:48 EDT Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Fri, 20 Apr 2018 19:04:36 -0700 Received: from petr-dev3.eng.vmware.com (petr-dev2.eng.vmware.com [10.20.93.186]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 47D05404D9; Fri, 20 Apr 2018 19:04:47 -0700 (PDT) Received: by petr-dev3.eng.vmware.com (Postfix, from userid 1078) id 3F5E6A00231; Fri, 20 Apr 2018 19:04:47 -0700 (PDT) Date: Fri, 20 Apr 2018 19:04:47 -0700 From: Jim Gill To: CC: , Subject: [PATCH] scsi: vmw-pvscsi: return DID_BUS_BUSY for adapter-initated aborts Message-ID: <20180421020447.GA4887@petr-dev3.eng.vmware.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) Received-SPF: None (EX13-EDG-OU-002.vmware.com: jgill@vmware.com does not designate permitted sender hosts) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The vmw_pvscsi driver returns DID_ABORT for commands aborted internally by the adapter, leading to the filesystem going read-only. Change the result to DID_BUS_BUSY, causing the kernel to retry the command. Signed-off-by: Jim Gill --- drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c index c374e3b..777e5f1 100644 --- a/drivers/scsi/vmw_pvscsi.c +++ b/drivers/scsi/vmw_pvscsi.c @@ -609,7 +609,7 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter, break; case BTSTAT_ABORTQUEUE: - cmd->result = (DID_ABORT << 16); + cmd->result = (DID_BUS_BUSY << 16); break; case BTSTAT_SCSIPARITY: