From patchwork Tue Nov 15 12:25:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zang Leigang X-Patchwork-Id: 9429603 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 EEE3C60471 for ; Tue, 15 Nov 2016 12:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB71328BD7 for ; Tue, 15 Nov 2016 12:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D026F28BDA; Tue, 15 Nov 2016 12:26:15 +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 91BF528BD7 for ; Tue, 15 Nov 2016 12:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933092AbcKOM0K (ORCPT ); Tue, 15 Nov 2016 07:26:10 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:32721 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932643AbcKOM0J (ORCPT ); Tue, 15 Nov 2016 07:26:09 -0500 Received: from 172.24.1.137 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.137]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DQR70204; Tue, 15 Nov 2016 20:26:06 +0800 (CST) Received: from HSH1000008702.china.huawei.com (10.184.169.118) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Tue, 15 Nov 2016 20:26:04 +0800 From: Zang Leigang To: , , , Subject: [PATCH] scsi: ufs: remove unnecessary UFSHCD_STATE_ERROR set Date: Tue, 15 Nov 2016 20:25:33 +0800 Message-ID: <20161115122533.75266-1-zangleigang@hisilicon.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Originating-IP: [10.184.169.118] X-CFilter-Loop: Reflected 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 We set ufshcd_state to UFSHCD_STATE_ERROR when an err handler fails. So I think UFSHCD_STATE_ERROR means host not works any more. Set it before schedule eh_work is not correct. Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 05c7456..a7724ad 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4158,7 +4158,6 @@ static void ufshcd_check_errors(struct ufs_hba *hba) /* block commands from scsi mid-layer */ scsi_block_requests(hba->host); - hba->ufshcd_state = UFSHCD_STATE_ERROR; schedule_work(&hba->eh_work); } }