[SCSI] mpt2sas: staged device discovery. disable_discovery module parameter is added.
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 17 Jun 2010 08:01:17 +0000 (13:31 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:02:07 +0000 (12:02 -0500)
Added command line option called disable_discovery.  When enabled
on the command line, the driver will not send a port_enable when loaded
for the first time.   If port_enable is not called, then there is
no discovery of devices, as well as the sas topology.  Then later if one
desires to invoke discovery, then they will need to issue a diagnostic reset.
A diagnostic reset can be issued various ways. One of the way is throught
sysfs.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_base.c

index f0c0df4278d7cf921e620c01d7c4bd19be420f6e..68cb000bf4864b33d63a7666ab17bb716b72c6ee 100644 (file)
@@ -95,6 +95,10 @@ int mpt2sas_fwfault_debug;
 MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault "
     "and halt firmware - (default=0)");
 
+static int disable_discovery = -1;
+module_param(disable_discovery, int, 0);
+MODULE_PARM_DESC(disable_discovery, " disable discovery ");
+
 /**
  * _scsih_set_fwfault_debug - global setting of ioc->fwfault_debug.
  *
@@ -3520,6 +3524,9 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
        if (sleep_flag == CAN_SLEEP)
                _base_static_config_pages(ioc);
 
+       if (ioc->wait_for_port_enable_to_complete && disable_discovery > 0)
+               return r;
+
        r = _base_send_port_enable(ioc, sleep_flag);
        if (r)
                return r;