RE: [PATCH 2/2] scsi: ufs: Do not exit ufshcd_err_handler() unless operational or dead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >>                 hba->force_reset = false;
> >>                 spin_unlock_irqrestore(hba->host->host_lock, flags);
> >>                 err = ufshcd_reset_and_restore(hba); @@ -6232,6
> >> +6245,13 @@ static void ufshcd_err_handler(struct Scsi_Host
> >> *host)
> >>                         dev_err_ratelimited(hba->dev, "%s: exit:
> >> saved_err 0x%x saved_uic_err 0x%x",
> >>                             __func__, hba->saved_err, hba->saved_uic_err);
> >>         }
> >> +       /* Exit in an operational state or dead */
> >> +       if (hba->ufshcd_state != UFSHCD_STATE_OPERATIONAL &&
> >> +           hba->ufshcd_state != UFSHCD_STATE_ERROR) {
> >> +               if (--retries)
> >> +                       goto again;
> > Why do you need to retry here as well?
> 
> Thanks for looking at this.
> 
> It shouldn't hurt to retry bringing the device back to life.  The alternative is
> UFSHCD_STATE_ERROR which means dead.
> 
> > ufshcd_reset_and_restore() already exists only if operational or dead?
> 
> ufshcd_reset_and_restore() isn't the only path.  There are also
> ufshcd_quirk_dl_nac_errors() and ufshcd_config_pwr_mode() and in the
> future perhaps others.
> 
> This seems the right place to ensure that the error handler guarantees
> operational (or dead) status.
OK.  Thanks.
Avri




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux