Re: [PATCH V2 3/4] scsi: ufs: Fix device and host reset methods

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

 



On 7/3/2013 11:19 AM, Santosh Y wrote:
+
>+/**
>+ * ufshcd_eh_device_reset_handler - device reset handler registered to
>+ *                                    scsi layer.
>+ * @cmd - SCSI command pointer
>+ *
>+ * Returns SUCCESS/FAILED
>+ */
>+static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
>+{
>+       struct ufs_hba *hba;
>+       int err;
>+       unsigned long flags;
>+
>+       hba = shost_priv(cmd->device->host);
>+
>+       spin_lock_irqsave(hba->host->host_lock, flags);
>+       if (hba->ufshcd_state == UFSHCD_STATE_RESET) {
>+               dev_warn(hba->dev, "%s: reset in progress\n", __func__);
>+               err = SUCCESS;
>+               spin_unlock_irqrestore(hba->host->host_lock, flags);
>+               goto out;
It is better to wait here until the state changes to 'operational' or
'error' before returning success.

Okay. Sounds good.

--
Regards,
Sujit
--
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