Merge "scsi: ufs: handle LINERESET error only during hibern8 enter"
This commit is contained in:
commit
fcc0fdda2c
1 changed files with 9 additions and 11 deletions
|
@ -4332,13 +4332,9 @@ int ufshcd_uic_hibern8_exit(struct ufs_hba *hba)
|
||||||
ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
|
ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
|
||||||
trace_ufshcd_profile_hibern8(dev_name(hba->dev), "exit",
|
trace_ufshcd_profile_hibern8(dev_name(hba->dev), "exit",
|
||||||
ktime_to_us(ktime_sub(ktime_get(), start)), ret);
|
ktime_to_us(ktime_sub(ktime_get(), start)), ret);
|
||||||
/*
|
|
||||||
* Do full reinit if exit failed or if LINERESET was detected during
|
/* Do full reinit if exit failed */
|
||||||
* Hibern8 operation. After LINERESET, link moves to default PWM-G1
|
if (ret) {
|
||||||
* mode hence full reinit is required to move link to HS speeds.
|
|
||||||
*/
|
|
||||||
if (ret || hba->full_init_linereset) {
|
|
||||||
hba->full_init_linereset = false;
|
|
||||||
ufshcd_update_error_stats(hba, UFS_ERR_HIBERN8_EXIT);
|
ufshcd_update_error_stats(hba, UFS_ERR_HIBERN8_EXIT);
|
||||||
dev_err(hba->dev, "%s: hibern8 exit failed. ret = %d",
|
dev_err(hba->dev, "%s: hibern8 exit failed. ret = %d",
|
||||||
__func__, ret);
|
__func__, ret);
|
||||||
|
@ -6083,14 +6079,16 @@ static irqreturn_t ufshcd_update_uic_error(struct ufs_hba *hba)
|
||||||
__func__, reg);
|
__func__, reg);
|
||||||
ufshcd_update_uic_reg_hist(&hba->ufs_stats.pa_err, reg);
|
ufshcd_update_uic_reg_hist(&hba->ufs_stats.pa_err, reg);
|
||||||
|
|
||||||
/* Don't ignore LINERESET indication during hibern8 operation */
|
/*
|
||||||
|
* Don't ignore LINERESET indication during hibern8
|
||||||
|
* enter operation.
|
||||||
|
*/
|
||||||
if (reg & UIC_PHY_ADAPTER_LAYER_GENERIC_ERROR) {
|
if (reg & UIC_PHY_ADAPTER_LAYER_GENERIC_ERROR) {
|
||||||
struct uic_command *cmd = hba->active_uic_cmd;
|
struct uic_command *cmd = hba->active_uic_cmd;
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
if ((cmd->command == UIC_CMD_DME_HIBER_ENTER)
|
if (cmd->command == UIC_CMD_DME_HIBER_ENTER) {
|
||||||
|| (cmd->command == UIC_CMD_DME_HIBER_EXIT)) {
|
dev_err(hba->dev, "%s: LINERESET during hibern8 enter, reg 0x%x\n",
|
||||||
dev_err(hba->dev, "%s: LINERESET during hibern8, reg 0x%x\n",
|
|
||||||
__func__, reg);
|
__func__, reg);
|
||||||
hba->full_init_linereset = true;
|
hba->full_init_linereset = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue