]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[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 1f2caa01ec924c19abcae8187a1f3173e5e7a69a..b36ca9a2dfbb2b497fab3995df96f659940a7c48 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);