From: hgchu Date: Fri, 12 Jan 2018 06:25:37 +0000 (+0900) Subject: [COMMON] scsi: ufs: move notifying bus reset into other location X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65c1329736103456c613b6a53d2b84e31cdf553b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [COMMON] scsi: ufs: move notifying bus reset into other location Change-Id: Icfb7772f7bf067becdce952b088c1c2e02f58315 Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index d3c5d7aa259d..317eae63c98c 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6756,6 +6756,16 @@ out: trace_ufshcd_init(dev_name(hba->dev), ret, ktime_to_us(ktime_sub(ktime_get(), start)), hba->curr_dev_pwr_mode, hba->uic_link_state); + + if (!ret) { + /* + * Inform scsi mid-layer that we did reset and allow to handle + * Unit Attention properly. + */ + spin_lock_irqsave(hba->host->host_lock, flags); + scsi_report_bus_reset(hba->host, 0); + spin_unlock_irqrestore(hba->host->host_lock, flags); + } return ret; }