From patchwork Sat Nov 2 05:03:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 11224019 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 51D53139A for ; Sat, 2 Nov 2019 05:04:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E6392084D for ; Sat, 2 Nov 2019 05:04:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Mi3kMvnx"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="JRMJJnly" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727820AbfKBFD7 (ORCPT ); Sat, 2 Nov 2019 01:03:59 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51262 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfKBFD6 (ORCPT ); Sat, 2 Nov 2019 01:03:58 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 60E6F61549; Sat, 2 Nov 2019 05:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572671037; bh=Ve/Yxvbisy8xe2h3IlOlgFo0c2W6vtKPBFXI0QOItL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mi3kMvnx4Ns9FtzRrkiukz9LqlUXHLlN3S/VoVKQGrAqpaILiCJXaKFrADR9ySYgu gLyR+FJYyragj4JBxhca0uWsQZG3mPI6d2wW9AY9SOAGDvruNH5dDU9clEGeBKQ17O dWZ664IeZvIBYEETxKviU32NrbLXTIh4noh0MFKg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cang@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 10737614E5; Sat, 2 Nov 2019 05:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572671030; bh=Ve/Yxvbisy8xe2h3IlOlgFo0c2W6vtKPBFXI0QOItL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JRMJJnlyaH6SyKV7HJaIsjbVrjFuO0gpD8vcD2+2opKuWTdl/zIC2ja9tnQdc0L2s xR0NhTOkacqJvuzt//J0R0N1j6YStj7td3Q6xVVSgxgAAMDZ3P6u9T9xooMe/tFI42 HVGuSvapI0Wy6gSfe3ZSoRWFu+fxkEKnUXACjI3E= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 10737614E5 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cang@codeaurora.org From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Subhash Jadavani , Tomas Winkler , Venkat Gopalakrishnan , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 1/6] scsi: ufs: Add device reset in link recovery path Date: Fri, 1 Nov 2019 22:03:31 -0700 Message-Id: <1572671016-883-2-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1572671016-883-1-git-send-email-cang@codeaurora.org> References: <1572671016-883-1-git-send-email-cang@codeaurora.org> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In order to recover from hibern8 exit failure, perform a reset in link recovery path before issuing link start-up. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c28c144..525f8e6 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3859,6 +3859,9 @@ static int ufshcd_link_recovery(struct ufs_hba *hba) ufshcd_set_eh_in_progress(hba); spin_unlock_irqrestore(hba->host->host_lock, flags); + /* Reset the attached device */ + ufshcd_vops_device_reset(hba); + ret = ufshcd_host_reset_and_restore(hba); spin_lock_irqsave(hba->host->host_lock, flags);