aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReddy, Sreekanth <Sreekanth.Reddy@lsi.com>2013-02-26 06:29:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 17:07:31 -0400
commit0531603e3a0dbb7c36f2b37833add0e73b8c0c5f (patch)
tree1b6d6ffb21804a39b00a18613ec3edee866d241f
parent47c00d01fb222baaf8d248f855061da168b29c5d (diff)
SCSI: mpt2sas: Fix for issue Missing delay not getting set during system bootup
commit b0df96a0068daee4f9c2189c29b9053eb6e46b17 upstream. Missing delay is not getting set properly. The reason is that it is not defined in the same file from where it is being invoked. The fix is to move the missing delay module parameter from mpt2sas_base.c to mpt2sas_scsh.c. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c13
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h3
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c8
3 files changed, 13 insertions, 11 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index bcb23d28b3e8..c76b18bbacb8 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -80,10 +80,6 @@ static int msix_disable = -1;
80module_param(msix_disable, int, 0); 80module_param(msix_disable, int, 0);
81MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)"); 81MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
82 82
83static int missing_delay[2] = {-1, -1};
84module_param_array(missing_delay, int, NULL, 0);
85MODULE_PARM_DESC(missing_delay, " device missing delay , io missing delay");
86
87static int mpt2sas_fwfault_debug; 83static int mpt2sas_fwfault_debug;
88MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault " 84MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault "
89 "and halt firmware - (default=0)"); 85 "and halt firmware - (default=0)");
@@ -2199,7 +2195,7 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc)
2199} 2195}
2200 2196
2201/** 2197/**
2202 * _base_update_missing_delay - change the missing delay timers 2198 * mpt2sas_base_update_missing_delay - change the missing delay timers
2203 * @ioc: per adapter object 2199 * @ioc: per adapter object
2204 * @device_missing_delay: amount of time till device is reported missing 2200 * @device_missing_delay: amount of time till device is reported missing
2205 * @io_missing_delay: interval IO is returned when there is a missing device 2201 * @io_missing_delay: interval IO is returned when there is a missing device
@@ -2210,8 +2206,8 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc)
2210 * delay, as well as the io missing delay. This should be called at driver 2206 * delay, as well as the io missing delay. This should be called at driver
2211 * load time. 2207 * load time.
2212 */ 2208 */
2213static void 2209void
2214_base_update_missing_delay(struct MPT2SAS_ADAPTER *ioc, 2210mpt2sas_base_update_missing_delay(struct MPT2SAS_ADAPTER *ioc,
2215 u16 device_missing_delay, u8 io_missing_delay) 2211 u16 device_missing_delay, u8 io_missing_delay)
2216{ 2212{
2217 u16 dmd, dmd_new, dmd_orignal; 2213 u16 dmd, dmd_new, dmd_orignal;
@@ -4407,9 +4403,6 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
4407 if (r) 4403 if (r)
4408 goto out_free_resources; 4404 goto out_free_resources;
4409 4405
4410 if (missing_delay[0] != -1 && missing_delay[1] != -1)
4411 _base_update_missing_delay(ioc, missing_delay[0],
4412 missing_delay[1]);
4413 ioc->non_operational_loop = 0; 4406 ioc->non_operational_loop = 0;
4414 4407
4415 return 0; 4408 return 0;
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 4caaac13682f..11301974628b 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -1055,6 +1055,9 @@ void mpt2sas_base_validate_event_type(struct MPT2SAS_ADAPTER *ioc, u32 *event_ty
1055 1055
1056void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc); 1056void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc);
1057 1057
1058void mpt2sas_base_update_missing_delay(struct MPT2SAS_ADAPTER *ioc,
1059 u16 device_missing_delay, u8 io_missing_delay);
1060
1058int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc); 1061int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc);
1059 1062
1060/* scsih shared API */ 1063/* scsih shared API */
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index a49159561669..8dbe500c935d 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -101,6 +101,10 @@ static ushort max_sectors = 0xFFFF;
101module_param(max_sectors, ushort, 0); 101module_param(max_sectors, ushort, 0);
102MODULE_PARM_DESC(max_sectors, "max sectors, range 64 to 32767 default=32767"); 102MODULE_PARM_DESC(max_sectors, "max sectors, range 64 to 32767 default=32767");
103 103
104static int missing_delay[2] = {-1, -1};
105module_param_array(missing_delay, int, NULL, 0);
106MODULE_PARM_DESC(missing_delay, " device missing delay , io missing delay");
107
104/* scsi-mid layer global parmeter is max_report_luns, which is 511 */ 108/* scsi-mid layer global parmeter is max_report_luns, which is 511 */
105#define MPT2SAS_MAX_LUN (16895) 109#define MPT2SAS_MAX_LUN (16895)
106static int max_lun = MPT2SAS_MAX_LUN; 110static int max_lun = MPT2SAS_MAX_LUN;
@@ -7299,7 +7303,9 @@ _firmware_event_work(struct work_struct *work)
7299 case MPT2SAS_PORT_ENABLE_COMPLETE: 7303 case MPT2SAS_PORT_ENABLE_COMPLETE:
7300 ioc->start_scan = 0; 7304 ioc->start_scan = 0;
7301 7305
7302 7306 if (missing_delay[0] != -1 && missing_delay[1] != -1)
7307 mpt2sas_base_update_missing_delay(ioc, missing_delay[0],
7308 missing_delay[1]);
7303 7309
7304 dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "port enable: complete " 7310 dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "port enable: complete "
7305 "from worker thread\n", ioc->name)); 7311 "from worker thread\n", ioc->name));