From cfdf9c9103e4b80feb222c2ec1dbec6b8fe9edbf Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Tue, 30 Jul 2013 00:36:03 +0530 Subject: [PATCH] [SCSI] ufs: don't stop controller before scsi_remove_host() scsi_remove_host() sends SYNCHRONIZE CACHE commands for write cache enabled scsi disk devices. So stopping controller working shouldn't be done before scsi_remove_host(). Signed-off-by: Akinobu Mita Signed-off-by: Santosh Y Signed-off-by: James Bottomley --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 1f2caa01ec92..b36ca9a2dfbb 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2603,11 +2603,11 @@ EXPORT_SYMBOL(ufshcd_runtime_idle); */ void ufshcd_remove(struct ufs_hba *hba) { + scsi_remove_host(hba->host); /* disable interrupts */ ufshcd_disable_intr(hba, hba->intr_mask); ufshcd_hba_stop(hba); - scsi_remove_host(hba->host); scsi_host_put(hba->host); } EXPORT_SYMBOL_GPL(ufshcd_remove); -- 2.20.1