From 65c1329736103456c613b6a53d2b84e31cdf553b Mon Sep 17 00:00:00 2001 From: hgchu Date: Fri, 12 Jan 2018 15:25:37 +0900 Subject: [PATCH] [COMMON] scsi: ufs: move notifying bus reset into other location Change-Id: Icfb7772f7bf067becdce952b088c1c2e02f58315 Signed-off-by: hgchu --- drivers/scsi/ufs/ufshcd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; } -- 2.20.1