[SCSI] ufs: don't stop controller before scsi_remove_host()
authorAkinobu Mita <mita@fixstars.com>
Mon, 29 Jul 2013 19:06:03 +0000 (00:36 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 26 Aug 2013 08:51:28 +0000 (12:51 +0400)
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 <mita@fixstars.com>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/ufs/ufshcd.c

index 1f2caa0..b36ca9a 100644 (file)
@@ -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);