All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: check link active or not after switch to HS mode
@ 2017-06-24 11:44 Zang Leigang
  2017-06-28 23:48 ` Subhash Jadavani
  0 siblings, 1 reply; 3+ messages in thread
From: Zang Leigang @ 2017-06-24 11:44 UTC (permalink / raw)
  To: vinholikatti, jejb, martin.petersen; +Cc: linux-scsi

Some device can successfully link and switch to HS mode. But failed
to do more. ufshcd_verify_dev_init can help to find this earlier.

Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index ffe8d8608818..eb03388fc4bd 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6373,6 +6373,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
 					__func__, ret);
 			goto out;
 		}
+
+		/*
+		 * Some device lost link after switch to HS mode. Check if
+		 * connect is established here.
+		 */
+		ret = ufshcd_verify_dev_init(hba);
+		if (ret)
+			goto out;
 	}
 
 	/* set the state as operational after switching to desired gear */
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: ufs: check link active or not after switch to HS mode
  2017-06-24 11:44 [PATCH] scsi: ufs: check link active or not after switch to HS mode Zang Leigang
@ 2017-06-28 23:48 ` Subhash Jadavani
  2017-06-29  3:04   ` Zang Leigang
  0 siblings, 1 reply; 3+ messages in thread
From: Subhash Jadavani @ 2017-06-28 23:48 UTC (permalink / raw)
  To: Zang Leigang
  Cc: vinholikatti, jejb, martin.petersen, linux-scsi, linux-scsi-owner

On 2017-06-24 04:44, Zang Leigang wrote:
> Some device can successfully link and switch to HS mode. But failed
> to do more. ufshcd_verify_dev_init can help to find this earlier.
> 
> Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index ffe8d8608818..eb03388fc4bd 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6373,6 +6373,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
>  					__func__, ret);
>  			goto out;
>  		}
> +
> +		/*
> +		 * Some device lost link after switch to HS mode. Check if
> +		 * connect is established here.
> +		 */

I have never across such failures. If this issue is limited to certain 
device vendors then I don't think if we want to do send NOP 
unconditionally for all the devices.
We should probably add quirk for these failed devices and send NOP only 
for such devices.


> +		ret = ufshcd_verify_dev_init(hba);
> +		if (ret)
> +			goto out;
>  	}
> 
>  	/* set the state as operational after switching to desired gear */

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: ufs: check link active or not after switch to HS mode
  2017-06-28 23:48 ` Subhash Jadavani
@ 2017-06-29  3:04   ` Zang Leigang
  0 siblings, 0 replies; 3+ messages in thread
From: Zang Leigang @ 2017-06-29  3:04 UTC (permalink / raw)
  To: Subhash Jadavani
  Cc: vinholikatti, jejb, martin.petersen, linux-scsi, linux-scsi-owner

On Wed, Jun 28, 2017 at 04:48:21PM -0700, Subhash Jadavani wrote:
> On 2017-06-24 04:44, Zang Leigang wrote:
> >Some device can successfully link and switch to HS mode. But failed
> >to do more. ufshcd_verify_dev_init can help to find this earlier.
> >
> >Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
> >
> >diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> >index ffe8d8608818..eb03388fc4bd 100644
> >--- a/drivers/scsi/ufs/ufshcd.c
> >+++ b/drivers/scsi/ufs/ufshcd.c
> >@@ -6373,6 +6373,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
> > 					__func__, ret);
> > 			goto out;
> > 		}
> >+
> >+		/*
> >+		 * Some device lost link after switch to HS mode. Check if
> >+		 * connect is established here.
> >+		 */
> 
> I have never across such failures. If this issue is limited to
> certain device vendors then I don't think if we want to do send NOP
> unconditionally for all the devices.
> We should probably add quirk for these failed devices and send NOP
> only for such devices.

I have double checked this issue, it's already fixed. This patch doesn't need
any more. Thanks.
> 
> 
> >+		ret = ufshcd_verify_dev_init(hba);
> >+		if (ret)
> >+			goto out;
> > 	}
> >
> > 	/* set the state as operational after switching to desired gear */
> 
> -- 
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

-- 
Thanks,
Zang Leigang

________________________________________________________________________________
本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-29  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24 11:44 [PATCH] scsi: ufs: check link active or not after switch to HS mode Zang Leigang
2017-06-28 23:48 ` Subhash Jadavani
2017-06-29  3:04   ` Zang Leigang

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.