RE: [RFC PATCH v1] scsi: ufs: set STATE_ERROR when ufshcd_probe_hba() failed

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

 



> 
> set STATE_ERR like below to prevent a lockup(IO stuck)
> when ufshcd_probe_hba() returns error.
> 
> Change-Id: I6c85ff290503cc9414d7f5fdd934295497b854ff
> Signed-off-by: Lee Sang Hyun <sh425.lee@xxxxxxxxxxx>
> ---
>  drivers/scsi/ufs/ufshcd.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index ad4fc82..9780a5a 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7439,6 +7439,11 @@ static int ufshcd_probe_hba(struct ufs_hba *hba,
> bool async)
>         ufshcd_auto_hibern8_enable(hba);
> 
>  out:
> +       if (ret) {
> +               spin_lock_irqsave(hba->host->host_lock, flags);
Is this compiling? ufshcd_probe_hba has no unsigned long flags variable.


> +               hba->ufshcd_state = UFSHCD_STATE_ERROR;
> +               spin_unlock_irqrestore(hba->host->host_lock, flags);
> +       }
> 
>         trace_ufshcd_init(dev_name(hba->dev), ret,
>                 ktime_to_us(ktime_sub(ktime_get(), start)),
> --
> 2.7.4





[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