linux-stable/drivers/scsi
Steve Sistare 4d715fe508 scsi: megaraid_sas: reduce module load time
[ Upstream commit 31b6a05f86 ]

megaraid_sas takes 1+ seconds to load while waiting for firmware:

[2.822603] megaraid_sas 0000:03:00.0: Waiting for FW to come to ready state
[3.871003] megaraid_sas 0000:03:00.0: FW now in Ready state

This is due to the following loop in megasas_transition_to_ready(), which
waits a minimum of 1 second, even though the FW becomes ready in tens of
millisecs:

        /*
         * The cur_state should not last for more than max_wait secs
         */
        for (i = 0; i < max_wait; i++) {
                ...
                msleep(1000);
        ...
        dev_info(&instance->pdev->dev, "FW now in Ready state\n");

This is a regression, caused by a change of the msleep granularity from 1
to 1000 due to concern about waiting too long on systems with coarse
jiffies.

To fix, increase iterations and use msleep(20), which results in:

[2.670627] megaraid_sas 0000:03:00.0: Waiting for FW to come to ready state
[2.739386] megaraid_sas 0000:03:00.0: FW now in Ready state

Fixes: fb2f3e96d80f ("scsi: megaraid_sas: Fix msleep granularity")
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:30 +01:00
..
aacraid scsi: aacraid: Insure we don't access PCIe space during AER/EEH 2019-05-04 09:20:20 +02:00
aic7xxx scsi: aic7xxx: fix EISA support 2019-05-16 19:41:23 +02:00
aic94xx scsi: aic94xx: fix module loading 2019-02-12 19:47:25 +01:00
arcmsr scsi: arcmsr: clean up clang warning on extraneous parentheses 2019-11-24 08:20:59 +01:00
arm treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
be2iscsi scsi: be2iscsi: Update copyright 2018-06-19 22:02:25 -04:00
bfa scsi: bfa: release allocated memory in case of error 2020-01-14 20:07:06 +01:00
bnx2fc scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-06-19 08:18:03 +02:00
bnx2i scsi: bnx2i: fix potential use after free 2020-01-23 08:21:38 +01:00
csiostor scsi: csiostor: Don't enable IRQs too early 2020-01-04 19:12:40 +01:00
cxgbi scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy() 2020-01-17 19:47:14 +01:00
cxlflash scsi: cxlflash: Prevent deadlock when adapter probe fails 2019-02-12 19:47:25 +01:00
device_handler scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions 2019-11-10 11:27:20 +01:00
dpt
esas2r scsi: esas2r: unlock on error in esas2r_nvram_read_direct() 2020-01-23 08:21:38 +01:00
fcoe scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:52:27 +02:00
fnic scsi: fnic: fix invalid stack access 2020-01-23 08:21:28 +01:00
hisi_sas scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec() 2020-01-04 19:12:40 +01:00
ibmvscsi scsi: ibmvfc: fix WARN_ON during event pool release 2019-08-16 10:12:49 +02:00
ibmvscsi_tgt scsi: ibmvscsis: Ensure partition name is properly NUL terminated 2018-09-17 02:50:37 -04:00
isci scsi: isci: Change sci_controller_start_task's return type to sci_status 2019-12-01 09:16:28 +01:00
libfc scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:52:27 +02:00
libsas scsi: libsas: stop discovering if oob mode is disconnected 2020-01-09 10:18:57 +01:00
lpfc scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func 2020-01-09 10:18:56 +01:00
megaraid scsi: megaraid_sas: reduce module load time 2020-01-27 14:50:30 +01:00
mpt3sas scsi: mpt3sas: Fix clear pending bit in ioctl status 2020-01-04 19:12:35 +01:00
mvsas
osd osd: Convert to new IDA API 2018-08-21 23:54:17 -04:00
pcmcia scsi: remove the fdomain and fdomain_cs drivers 2018-03-19 22:54:47 -04:00
pm8001 scsi: pm80xx: Fix for SATA device discovery 2020-01-04 19:13:02 +01:00
qedf scsi: qedf: Do not retry ELS request if qedf_alloc_cmd fails 2020-01-09 10:19:07 +01:00
qedi scsi: qedi: Check targetname while finding boot target information 2019-07-14 08:11:15 +02:00
qla2xxx scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan 2020-01-23 08:21:38 +01:00
qla4xxx scsi: qla4xxx: fix double free bug 2020-01-23 08:21:38 +01:00
smartpqi scsi: smartpqi: unlock on error in pqi_submit_raid_request_synchronous() 2019-06-25 11:35:58 +08:00
snic scsi: snic: fix printing time intervals 2018-07-12 23:01:16 -04:00
sym53c8xx_2 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() 2019-11-20 18:46:29 +01:00
ufs scsi: ufs: Fix error handing during hibern8 enter 2020-01-04 19:13:03 +01:00
.gitignore
3w-9xxx.c scsi: 3ware: fix return 0 on the error path of probe 2018-07-30 23:17:53 -04:00
3w-9xxx.h
3w-sas.c scsi: 3ware: fix return 0 on the error path of probe 2018-07-30 23:17:53 -04:00
3w-sas.h
3w-xxxx.c scsi: 3ware: fix return 0 on the error path of probe 2018-07-30 23:17:53 -04:00
3w-xxxx.h
53c700.c scsi: 53c700: pass correct "dev" to dma_alloc_attrs() 2019-03-13 14:02:31 -07:00
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c scsi: a100u2w: Replace mdelay() with msleep() 2018-07-30 23:17:53 -04:00
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c scsi: read host_busy via scsi_host_busy() 2018-06-26 12:53:26 -04:00
aha152x.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
aha152x.h
aha1542.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
aha1542.h
aha1740.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
aha1740.h scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
am53c974.c scsi: am53c974: Use module_pci_driver 2018-05-01 23:29:41 -04:00
atari_scsi.c scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE 2020-01-04 19:12:56 +01:00
atp870u.c scsi: atp870u: Replace mdelay() with msleep() 2018-07-30 23:17:53 -04:00
atp870u.h
BusLogic.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
BusLogic.h
bvme6000_scsi.c
ch.c scsi: ch: Make it possible to open a ch device multiple times again 2019-10-29 09:19:50 +01:00
constants.c
dc395x.c scsi: dc395x: fix DMA API usage in sg_update_list 2019-12-01 09:16:32 +01:00
dc395x.h
dmx3191d.c
dpt_i2o.c scsi: dpt_i2o: Remove VLA usage 2018-05-18 12:03:51 -04:00
dpti.h scsi: dpt_i2o: stop using scsi_unregister 2018-03-15 00:25:37 -04:00
esp_scsi.c scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:08:32 -08:00
esp_scsi.h scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:08:32 -08:00
FlashPoint.c
g_NCR5380.c
gdth.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
gdth.h scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
gdth_ioctl.h
gdth_proc.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
gdth_proc.h
gvp11.c
gvp11.h
hosts.c Revert "scsi: core: avoid host-wide host_busy counter for scsi_mq" 2018-08-27 13:17:00 -04:00
hpsa.c scsi: hpsa: correct scsi command status issue after reset 2019-08-25 10:47:54 +02:00
hpsa.h scsi: hpsa: correct enclosure sas address 2018-07-10 22:25:03 -04:00
hpsa_cmd.h scsi: hpsa: correct ioaccel2 chaining 2019-07-10 09:53:37 +02:00
hptiop.c
hptiop.h
imm.c scsi: don't add scsi command result bytes 2018-06-26 12:27:07 -04:00
imm.h
initio.c
initio.h
ipr.c scsi: ipr: System hung while dlpar adding primary ipr adapter back 2018-09-21 12:35:39 -04:00
ipr.h scsi: ipr: System hung while dlpar adding primary ipr adapter back 2018-09-21 12:35:39 -04:00
ips.c scsi: ips: fix missing break in switch 2019-12-01 09:16:26 +01:00
ips.h scsi: ips: fix firmware timestamps for 32-bit 2018-04-20 19:40:17 -04:00
iscsi_boot_sysfs.c
iscsi_tcp.c scsi: iscsi: Don't send data to unbound connection 2020-01-04 19:13:05 +01:00
iscsi_tcp.h
jazz_esp.c scsi: jazz_esp, sun3x_esp: Pass struct device pointer in dma calls 2018-03-12 22:05:43 -04:00
Kconfig scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE 2019-11-10 11:27:22 +01:00
lasi700.c
libiscsi.c scsi: iscsi: Fix a potential deadlock in the timeout handler 2019-12-21 10:57:41 +01:00
libiscsi_tcp.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
mac53c94.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
mac53c94.h
mac_esp.c scsi: esp_scsi: Track residual for PIO transfers 2018-11-13 11:08:32 -08:00
mac_scsi.c scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE 2020-01-04 19:12:56 +01:00
Makefile SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
megaraid.c scsi: megaraid: disable device when probe failed after enabled device 2019-10-29 09:19:29 +01:00
megaraid.h scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
mesh.c scsi: don't add scsi command result bytes 2018-06-26 12:27:07 -04:00
mesh.h
mvme16x_scsi.c
mvme147.c scsi: mvme147: stop using scsi_module.c 2018-03-19 22:54:47 -04:00
mvme147.h
mvumi.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
mvumi.h
ncr53c8xx.c scsi: ncr53c8xx: remove ScsiResult macro 2018-07-10 22:42:47 -04:00
ncr53c8xx.h
NCR5380.c scsi: NCR5380: Add disconnect_mask module parameter 2020-01-04 19:13:04 +01:00
NCR5380.h scsi: NCR5380: Have NCR5380_select() return a bool 2019-11-20 18:47:49 +01:00
nsp32.c
nsp32.h
nsp32_debug.c scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
nsp32_io.h
osst.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
osst.h
osst_detect.h
osst_options.h
pmcraid.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
pmcraid.h
ppa.c
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c scsi: read host_busy via scsi_host_busy() 2018-06-26 12:53:26 -04:00
qlogicpti.h
raid_class.c scsi: raid_attrs: fix unused variable warning 2018-12-19 19:19:49 +01:00
script_asm.pl
scsi.c scsi: read host_busy via scsi_host_busy() 2018-06-26 12:53:26 -04:00
scsi.h scsi: core: remove Scsi_Cmnd typedef 2018-06-19 22:02:25 -04:00
scsi_common.c
scsi_debug.c scsi: scsi_debug: num_tgts must be >= 0 2020-01-04 19:13:04 +01:00
scsi_debugfs.c scsi: devinfo: use const_ilog2 for array indices 2018-04-20 19:14:28 -04:00
scsi_debugfs.h
scsi_devinfo.c scsi: core: add new RDAC LENOVO/DE_Series device 2019-05-08 07:21:49 +02:00
scsi_dh.c scsi: core: add new RDAC LENOVO/DE_Series device 2019-05-08 07:21:49 +02:00
scsi_error.c scsi: core: save/restore command resid for error handling 2019-10-29 09:19:49 +01:00
scsi_ioctl.c scsi: core: check for equality of result byte values 2018-06-26 12:27:06 -04:00
scsi_lib.c scsi: core: Handle drivers which set sg_tablesize to zero 2019-11-20 18:45:10 +01:00
scsi_lib_dma.c
scsi_logging.c scsi: core: Reduce memory required for SCSI logging 2019-10-07 18:57:04 +02:00
scsi_logging.h
scsi_netlink.c
scsi_pm.c scsi: core: Synchronize request queue PM status only on successful resume 2019-01-22 21:40:32 +01:00
scsi_priv.h
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c 2019-04-05 22:33:01 +02:00
scsi_sysctl.c
scsi_sysfs.c scsi: core: try to get module before removing device 2019-10-29 09:19:50 +01:00
scsi_trace.c scsi: core: scsi_trace: Use get_unaligned_be*() 2020-01-23 08:21:38 +01:00
scsi_transport_api.h
scsi_transport_fc.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
scsi_transport_iscsi.c scsi: iscsi: flush running unbind operations when removing a session 2019-04-20 09:15:56 +02:00
scsi_transport_sas.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
scsi_transport_spi.c scsi: core: check for equality of result byte values 2018-06-26 12:27:06 -04:00
scsi_transport_srp.c for-4.18/block-20180603 2018-06-04 07:58:06 -07:00
scsicam.c
sd.c scsi: sd: enable compat ioctls for sed-opal 2020-01-17 19:47:06 +01:00
sd.h block: move dif_prepare/dif_complete functions to block layer 2018-07-30 08:27:02 -06:00
sd_dif.c block: move dif_prepare/dif_complete functions to block layer 2018-07-30 08:27:02 -06:00
sd_zbc.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
sense_codes.h
ses.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sg.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
sgiwd93.c
sim710.c
sni_53c710.c scsi: sni_53c710: fix compilation error 2019-11-10 11:27:21 +01:00
sr.c scsi: sr: Avoid that opening a CD-ROM hangs with runtime power management enabled 2018-08-03 13:53:51 -04:00
sr.h
sr_ioctl.c block: Switch struct packet_command to use struct scsi_sense_hdr 2018-08-02 15:22:13 -06:00
sr_vendor.c
st.c scsi: st: remove redundant pointer STbuffer 2018-08-08 21:15:54 -04:00
st.h
st_options.h
stex.c
storvsc_drv.c scsi: storvsc: Fix calculation of sub-channel count 2019-05-08 07:21:49 +02:00
sun3_scsi.c scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE 2020-01-04 19:12:56 +01:00
sun3_scsi_vme.c
sun3x_esp.c scsi: jazz_esp, sun3x_esp: Pass struct device pointer in dma calls 2018-03-12 22:05:43 -04:00
sun_esp.c
virtio_scsi.c scsi: virtio_scsi: don't send sc payload with tmfs 2019-03-23 20:09:59 +01:00
vmw_pvscsi.c scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck() 2019-07-03 13:14:45 +02:00
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c scsi: wd719x: Use module_pci_driver 2018-05-01 23:30:12 -04:00
wd719x.h
xen-scsifront.c scsi: xen-scsifront: add error handling for xenbus_printf 2018-06-19 14:54:41 +02:00
zalon.c
zorro7xx.c
zorro_esp.c scsi: zorro_esp: Limit DMA transfers to 65536 bytes (except on Fastlane) 2019-12-17 20:36:03 +01:00