mbox series

[v2,0/2] Add UFS LINERESET handling

Message ID 1599099873-32579-1-git-send-email-cang@codeaurora.org (mailing list archive)
Headers show
Series Add UFS LINERESET handling | expand

Message

Can Guo Sept. 3, 2020, 2:24 a.m. UTC
PA Layer issues a LINERESET to the PHY at the recovery step in the Power
Mode change operation. If it happens during auto or mannual hibern8 enter,
even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode
and kept in that mode after exit from hibern8, leading to bad performance.
Handle the LINERESET in the eh_work by restoring power mode to HS mode
after all pending reqs and tasks are cleared from doorbell.

Change since v1:
- Made some cleanup to the 2nd change.

Can Guo (2):
  scsi: ufs: Abort tasks before clear them from doorbell
  scsi: ufs: Handle LINERESET indication in err handler

 drivers/scsi/ufs/ufshcd.c | 283 +++++++++++++++++++++++++++++++---------------
 drivers/scsi/ufs/ufshcd.h |   2 +
 drivers/scsi/ufs/ufshci.h |   1 +
 drivers/scsi/ufs/unipro.h |   3 +
 4 files changed, 196 insertions(+), 93 deletions(-)

Comments

Martin K. Petersen Sept. 9, 2020, 2:09 a.m. UTC | #1
On Wed, 2 Sep 2020 19:24:30 -0700, Can Guo wrote:

> PA Layer issues a LINERESET to the PHY at the recovery step in the Power
> Mode change operation. If it happens during auto or mannual hibern8 enter,
> even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode
> and kept in that mode after exit from hibern8, leading to bad performance.
> Handle the LINERESET in the eh_work by restoring power mode to HS mode
> after all pending reqs and tasks are cleared from doorbell.
> 
> [...]

Applied to 5.10/scsi-queue, thanks!

[1/2] scsi: ufs: Abort tasks before clearing them from doorbell
      https://git.kernel.org/mkp/scsi/c/307348f6ab14
[2/2] scsi: ufs: Handle LINERESET indication in err handler
      https://git.kernel.org/mkp/scsi/c/2355b66ed20c