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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
