aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorandrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>2006-01-13 20:05:10 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 11:55:28 -0500
commit5998983113c1c9158c1ce66ff26a212aceaf7e5c (patch)
tree7b050a3851d3869eaf21c57042619161ac851a49 /drivers/scsi/qla2xxx
parent03ab2eabed74708c0c74163723007e8e72244219 (diff)
[SCSI] qla2xxx: Correct excessive delay during LOAD-RISC-RAM mailbox command.
Problem report (against 2.4.x driver) from Jeff Layton <jlayton@redhat.com>: An OEM noticed that the U6 qla2200 driver would hang for around 2 minutes at boot time and then proceed normally. I found that the delay was occurring when loading the new firmware into the card, and was due to a schedule_timeout(10) added to the bottom of the polling loop. Some testing showed that the load ram operation on the card was very quick (on the order of a couple of jiffies), but the sleep in the polling loop was making each operation take around 25-30. The attached patch corrects this by making it skip sleeping during the load ram operation, since I believe we only do that when the module is plugged in. It also skips sleeping if the mbox_int flag got set during the current loop. This corrected the hang on my test setup, and OEM also confirmed that it corrected the problem for them. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index f90e68de0a86..3de8fee69fa4 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -196,7 +196,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
196 /* Check for pending interrupts. */ 196 /* Check for pending interrupts. */
197 qla2x00_poll(ha); 197 qla2x00_poll(ha);
198 198
199 msleep(10); 199 if (command != MBC_LOAD_RISC_RAM_EXTENDED &&
200 !ha->flags.mbox_int)
201 msleep(10);
200 } /* while */ 202 } /* while */
201 } 203 }
202 204