From patchwork Fri May 18 23:25:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Gilbert X-Patchwork-Id: 10412431 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 0A1F66031B for ; Fri, 18 May 2018 23:26:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F34A028AA7 for ; Fri, 18 May 2018 23:26:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7FF828B02; Fri, 18 May 2018 23:26:00 +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 4978528AA7 for ; Fri, 18 May 2018 23:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbeERXZ7 (ORCPT ); Fri, 18 May 2018 19:25:59 -0400 Received: from smtp.infotech.no ([82.134.31.41]:51765 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbeERXZ6 (ORCPT ); Fri, 18 May 2018 19:25:58 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id A43EB2041CE; Sat, 19 May 2018 01:25:56 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OFxT69uHzEBo; Sat, 19 May 2018 01:25:51 +0200 (CEST) Received: from xtwo70.hitronhub.home (toroon2171w-lp140-01-74-14-82-227.dsl.bell.ca [74.14.82.227]) by smtp.infotech.no (Postfix) with ESMTPA id EC7C1204150; Sat, 19 May 2018 01:25:49 +0200 (CEST) From: Douglas Gilbert To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, bart.vanassche@wdc.com, mahesh.rajashekhara@microsemi.com Subject: [PATCH] scsi_lib: sanitize++ in progress Date: Fri, 18 May 2018 19:25:47 -0400 Message-Id: <20180518232547.8737-1-dgilbert@interlog.com> X-Mailer: git-send-email 2.17.0 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 A patch titled: "scsi: sd: improved drive sanitize error handling" by Mahesh Rajashekhara on 20180417 has been accepted into the kernel. It may not be sufficient, especially if the SCSI SANITIZE command is sent via the bsg or sg pass-throughs, since they don't use the sd driver. Add "Sanitize in progress" plus some other recent "... in progress" additional sense codes into the scsi mid-level so they are treated in a similar fashion to "Format in progress". Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e9b4f279d29c..9df5fbdbc854 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -985,6 +985,10 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) case 0x08: /* Long write in progress */ case 0x09: /* self test in progress */ case 0x14: /* space allocation in progress */ + case 0x1a: /* start stop unit in progress */ + case 0x1b: /* sanitize in progress */ + case 0x1d: /* configuration in progress */ + case 0x24: /* depopulation in progress */ action = ACTION_DELAYED_RETRY; break; default: