Re: [PATCH V2 4/4] scsi: ufs: Improve UFS fatal error handling

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

 



> +
> +/**
> + * ufshcd_fatal_err_handler - handle fatal errors
> + * @work: pointer to work structure
>   */
>  static void ufshcd_fatal_err_handler(struct work_struct *work)
>  {
>         struct ufs_hba *hba;
> +       unsigned long flags;
> +       u32 err_xfer = 0;
> +       u32 err_tm = 0;
> +       int err;
> +
>         hba = container_of(work, struct ufs_hba, feh_workq);
>
> -       /* check if reset is already in progress */
> -       if (hba->ufshcd_state != UFSHCD_STATE_RESET)
> -               ufshcd_do_reset(hba);
> +       spin_lock_irqsave(hba->host->host_lock, flags);
> +       if (hba->ufshcd_state == UFSHCD_STATE_RESET) {
> +               /* complete processed requests and exit */
> +               ufshcd_transfer_req_compl(hba);
> +               ufshcd_tmc_handler(hba);
> +               spin_unlock_irqrestore(hba->host->host_lock, flags);
> +               return;

I could not go through this patch yet, please check if it needs to
wait here until the state is 'operational' or 'error'.
The 'reset' state might be due to the device reset also.

> +       }
> +
> +       hba->ufshcd_state = UFSHCD_STATE_RESET;
> +       ufshcd_error_autopsy_transfer_req(hba, &err_xfer);
> +       ufshcd_error_autopsy_task_req(hba, &err_tm);
> +


-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux