Upstream commit : 2cb6fc8c014b9b00c4487a79b8f6ed0da4121f45

When a same drive is hot unplugged and hot plugged,  the 
drive is not getting reported. 

This was added back to the upstream through the below patch, commit ID 
"2cb6fc8c014b9b00c4487a79b8f6ed0da4121f45". 

So request to add the below patch to 3.2 stable kernel.


>From 2cb6fc8c014b9b00c4487a79b8f6ed0da4121f45 Mon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Tue, 13 Dec 2011 09:29:15 +0530
Subject: [PATCH 1/1] [SCSI] mpt2sas: Removed redundant calling of
 _scsih_probe_devices() from _scsih_probe

Removed redundant calling of _scsih_probe_devices() from _scsih_probe as
it is getting called from _scsih_scan_finished.

Also moved the function scsi_scan_host(shost) to get called after the
volumes on warp drive are reported to the OS. Otherwise by the time
the (ioc->hide_drives) flags is set, the volumes on warp drive
are reported to the OS already.

Also modified the initialization of reply queues only in case of driver load
time in the function _base_make_ioc_operational().

Signed-off-by: Nagalakshmi Nandigama <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
---
 drivers/scsi/mpt2sas/mpt2sas_base.c  |   20 +++++++-------------
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |    3 +--
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c 
b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 4819181..0b2c955 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -4099,7 +4099,8 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, 
int sleep_flag)
                ioc->reply_free[i] = cpu_to_le32(reply_address);
 
        /* initialize reply queues */
-       _base_assign_reply_queues(ioc);
+       if (ioc->is_driver_loading)
+               _base_assign_reply_queues(ioc);
 
        /* initialize Reply Post Free Queue */
        reply_post_free = (long)ioc->reply_post_free;
@@ -4147,24 +4148,17 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, 
int sleep_flag)
 
 
        if (ioc->is_driver_loading) {
-
-
-
-               ioc->wait_for_discovery_to_complete =
-                   _base_determine_wait_on_discovery(ioc);
-               return r; /* scan_start and scan_finished support */
-       }
-
-
-       if (ioc->wait_for_discovery_to_complete && ioc->is_warpdrive) {
-               if (ioc->manu_pg10.OEMIdentifier  == 0x80) {
+               if (ioc->is_warpdrive && ioc->manu_pg10.OEMIdentifier
+                   == 0x80) {
                        hide_flag = (u8) (ioc->manu_pg10.OEMSpecificFlags0 &
                            MFG_PAGE10_HIDE_SSDS_MASK);
                        if (hide_flag != MFG_PAGE10_HIDE_SSDS_MASK)
                                ioc->mfg_pg10_hide_flag = hide_flag;
                }
+               ioc->wait_for_discovery_to_complete =
+                   _base_determine_wait_on_discovery(ioc);
+               return r; /* scan_start and scan_finished support */
        }
-
        r = _base_send_port_enable(ioc, sleep_flag);
        if (r)
                return r;
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c 
b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 8cd4ebb..193e33e 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -8039,7 +8039,6 @@ _scsih_probe(struct pci_dev *pdev, const struct 
pci_device_id *id)
                goto out_attach_fail;
        }
 
-       scsi_scan_host(shost);
        if (ioc->is_warpdrive) {
                if (ioc->mfg_pg10_hide_flag ==  MFG_PAGE10_EXPOSE_ALL_DISKS)
                        ioc->hide_drives = 0;
@@ -8053,8 +8052,8 @@ _scsih_probe(struct pci_dev *pdev, const struct 
pci_device_id *id)
                }
        } else
                ioc->hide_drives = 0;
+       scsi_scan_host(shost);
 
-       _scsih_probe_devices(ioc);
        return 0;
 
  out_attach_fail:
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to