Message ID | 20210205013633.16243-3-dh0421.hwang@samsung.com (mailing list archive) |
---|---|
State | Deferred |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E7D8C43381 for <linux-scsi@archiver.kernel.org>; Fri, 5 Feb 2021 01:50:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E2C764E16 for <linux-scsi@archiver.kernel.org>; Fri, 5 Feb 2021 01:50:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbhBEBuP (ORCPT <rfc822;linux-scsi@archiver.kernel.org>); Thu, 4 Feb 2021 20:50:15 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:55197 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233000AbhBEBt5 (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Thu, 4 Feb 2021 20:49:57 -0500 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210205014914epoutp0219fbca9ddbb6705bafaf077601ac6ce0~gtuNquTEo1143411434epoutp02H for <linux-scsi@vger.kernel.org>; Fri, 5 Feb 2021 01:49:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210205014914epoutp0219fbca9ddbb6705bafaf077601ac6ce0~gtuNquTEo1143411434epoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1612489754; bh=zBlATRvYraRdAaJGrKEnqYtMnm/p4bFoVfSg53NqXac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gs8sYTye/5T2GvL9cOWG363cbS++PQ338yXARUFpnA6GgY24rCoYYSn3XQ7fzh/Go 79kcrd36ozgwkFa/2Pf38Kvs1t4oYr+BKXyy9c/jTm3I9WUodQVo5L8Wvf+BqV3Dp6 Zc88c8JUYwmDiY6RrqgIMYz4ZugB3keAXmwVSRKE= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20210205014913epcas1p37bc49ec7611462940f04a7f86b146ea2~gtuM_-k381527315273epcas1p3L; Fri, 5 Feb 2021 01:49:13 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.163]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4DWyyH1vQ8z4x9Q9; Fri, 5 Feb 2021 01:49:11 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 08.AE.09577.714AC106; Fri, 5 Feb 2021 10:49:11 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20210205014910epcas1p3bcaa909ace0684150973ccc3a35bb0de~gtuJ44pAx1526515265epcas1p3B; Fri, 5 Feb 2021 01:49:10 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210205014910epsmtrp255cb99957ee22a6dc5d543baad0532b9~gtuJ2FcS92849228492epsmtrp2o; Fri, 5 Feb 2021 01:49:10 +0000 (GMT) X-AuditID: b6c32a39-c13ff70000002569-c8-601ca417bf35 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id EC.E8.13470.614AC106; Fri, 5 Feb 2021 10:49:10 +0900 (KST) Received: from localhost.localdomain (unknown [10.253.101.61]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210205014910epsmtip2e954d452f0c93b43abedb0d53cdaac1d~gtuJkHrar0106301063epsmtip2B; Fri, 5 Feb 2021 01:49:09 +0000 (GMT) From: DooHyun Hwang <dh0421.hwang@samsung.com> To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, cang@codeaurora.org, asutoshd@codeaurora.org, beanhuo@micron.com, jaegeuk@kernel.org, adrian.hunter@intel.com, satyat@google.com Cc: grant.jung@samsung.com, jt77.jang@samsung.com, junwoo80.lee@samsung.com, jangsub.yi@samsung.com, sh043.lee@samsung.com, cw9316.lee@samsung.com, sh8267.baek@samsung.com, wkon.kim@samsung.com, DooHyun Hwang <dh0421.hwang@samsung.com> Subject: [PATCH 3/3] scsi: ufs: reset the ufs device before link startup retry Date: Fri, 5 Feb 2021 10:36:33 +0900 Message-Id: <20210205013633.16243-3-dh0421.hwang@samsung.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210205013633.16243-1-dh0421.hwang@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Tf0xbVRTHc1/b15at81kG3CBiV52RKbQFSi8TGozgno5kGKNZnAYe8ELZ SltbujCTIb9SYWWjZIubVTbY+KFMaGCAiFB+LUINYfzYGJsYfoQFgTFHy4ZzwGx5LPLf95z7 Oeebc+69PJZwBffnpWsyab2GUotxL3ZLb5Ak2K8yIEn6MIeLHLM/4WjqYguOOkz9XDT/5BaO uqeL2Mhpq+agC7+bOMg+5uCif9dtXDRrs7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w2+2+1POHP2REr39qxmCx3yD57OXZtZG9a5uf vJ38qUst/EqpXH1EUZD0z7vbVX4pK3NJvF3vped0zOlS4T016acaSizFGYmGWsxFxYkALheC xEADAAA= X-CMS-MailID: 20210205014910epcas1p3bcaa909ace0684150973ccc3a35bb0de X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210205014910epcas1p3bcaa909ace0684150973ccc3a35bb0de References: <20210205013633.16243-1-dh0421.hwang@samsung.com> <CGME20210205014910epcas1p3bcaa909ace0684150973ccc3a35bb0de@epcas1p3.samsung.com> Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
[1/3] scsi: ufs: retry link startup if that fails and device state is not active
|
expand
|
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 32cb3b0dcbcf..a87e98631a72 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4644,7 +4644,15 @@ static int ufshcd_link_startup(struct ufs_hba *hba) (u32)ret); if (link_startup_again) { + int err = 0; + link_startup_again = false; + + /* Reset the attached device before retrying */ + err = ufshcd_vops_device_reset(hba); + if (err && (err != -EOPNOTSUPP)) + ufshcd_update_evt_hist(hba, UFS_EVT_DEV_RESET, err); + retries = DME_LINKSTARTUP_RETRIES; goto link_startup; }
If the link startup command fails, trigger hardware reset to reset the UFS device before link startup retry. Signed-off-by: DooHyun Hwang <dh0421.hwang@samsung.com> --- drivers/scsi/ufs/ufshcd.c | 8 ++++++++ 1 file changed, 8 insertions(+)