All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seunghui Lee <sh043.lee@samsung.com>
To: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org,
	jejb@linux.ibm.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: grant.jung@samsung.com, jt77.jang@samsung.com,
	dh0421.hwang@samsung.com, junwoo80.lee@samsung.com,
	jangsub.yi@samsung.com, cw9316.lee@samsung.com,
	sh8267.baek@samsung.com, wkon.kim@samsung.com,
	Seunghui Lee <sh043.lee@samsung.com>
Subject: [PATCH] scsi: ufs: no sw reset after last linkstartup fail
Date: Thu, 30 Jun 2022 13:48:04 +0900	[thread overview]
Message-ID: <20220630044804.6080-1-sh043.lee@samsung.com> (raw)
In-Reply-To: CGME20220630041602epcas1p3f3427b4ceac68f8325d3f89bc8635603@epcas1p3.samsung.com

Host driver resets the host(ufshcd_hba_enable) after last linkstartup
command failed. All of the member or host dump after linkstartup fail are
reset value because of sw reset.

Signed-off-by: Junwoo Lee <junwoo80.lee@samsung.com>
Signed-off-by: Seunghui Lee <sh043.lee@samsung.com>
---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 7c1d7bb9c579..2cdc14675443 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4753,7 +4753,7 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
 		 * but we can't be sure if the link is up until link startup
 		 * succeeds. So reset the local Uni-Pro and try again.
 		 */
-		if (ret && ufshcd_hba_enable(hba)) {
+		if (ret && retries && ufshcd_hba_enable(hba)) {
 			ufshcd_update_evt_hist(hba,
 					       UFS_EVT_LINK_STARTUP_FAIL,
 					       (u32)ret);
-- 
2.29.0


       reply	other threads:[~2022-06-30  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220630041602epcas1p3f3427b4ceac68f8325d3f89bc8635603@epcas1p3.samsung.com>
2022-06-30  4:48 ` Seunghui Lee [this message]
2022-07-04 11:11   ` [PATCH] scsi: ufs: no sw reset after last linkstartup fail Seunghui Lee
2022-07-05  6:51     ` Avri Altman
2022-07-05  7:49       ` Seunghui Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220630044804.6080-1-sh043.lee@samsung.com \
    --to=sh043.lee@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cw9316.lee@samsung.com \
    --cc=dh0421.hwang@samsung.com \
    --cc=grant.jung@samsung.com \
    --cc=jangsub.yi@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=jt77.jang@samsung.com \
    --cc=junwoo80.lee@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sh8267.baek@samsung.com \
    --cc=wkon.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.