From patchwork Sat Jun 24 10:27:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zang Leigang X-Patchwork-Id: 9807755 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 AF58B60349 for ; Sat, 24 Jun 2017 10:28:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9581D204BE for ; Sat, 24 Jun 2017 10:28:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7503427F97; Sat, 24 Jun 2017 10:28:12 +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=-6.9 required=2.0 tests=BAYES_00,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 D8DB3204BE for ; Sat, 24 Jun 2017 10:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751281AbdFXK2I (ORCPT ); Sat, 24 Jun 2017 06:28:08 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:8836 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdFXK2I (ORCPT ); Sat, 24 Jun 2017 06:28:08 -0400 Received: from 172.30.72.57 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.57]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id APX88115; Sat, 24 Jun 2017 18:27:59 +0800 (CST) Received: from kirin.host.huawei.com (10.184.169.118) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 24 Jun 2017 18:27:56 +0800 From: Zang Leigang To: , , CC: Subject: [PATCH] scsi: ufs: set host_byte to DID_REQUEUE when ocs = OCS_ABORTED Date: Sat, 24 Jun 2017 18:27:22 +0800 Message-ID: <20170624102722.4050-1-zangleigang@hisilicon.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-Originating-IP: [10.184.169.118] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.594E3EB0.013B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4b7f4cd737060c279f04460009db3313 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 Host set ocs to OCS_ABORTED when clear a doorbell in err handler. Then scsi_decide_disposition return SUCCESS. This may cause some filesystem panic because a FAILED REQUESET. Requeue and complete is better. Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ffe8d8608818..e050dcea1bea 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4545,8 +4545,6 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) } break; case OCS_ABORTED: - result |= DID_ABORT << 16; - break; case OCS_INVALID_COMMAND_STATUS: result |= DID_REQUEUE << 16; break;