diff options
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_init.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 7f6cc2ebf46c..beaeb18a66ab 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
@@ -1046,7 +1046,7 @@ static void qla4x00_pci_config(struct scsi_qla_host *ha) | |||
1046 | static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) | 1046 | static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) |
1047 | { | 1047 | { |
1048 | int status = QLA_ERROR; | 1048 | int status = QLA_ERROR; |
1049 | uint32_t max_wait_time; | 1049 | unsigned long max_wait_time; |
1050 | unsigned long flags; | 1050 | unsigned long flags; |
1051 | uint32_t mbox_status; | 1051 | uint32_t mbox_status; |
1052 | 1052 | ||
@@ -1078,7 +1078,10 @@ static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) | |||
1078 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 1078 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
1079 | 1079 | ||
1080 | /* Wait for firmware to come UP. */ | 1080 | /* Wait for firmware to come UP. */ |
1081 | max_wait_time = FIRMWARE_UP_TOV * 4; | 1081 | DEBUG2(printk(KERN_INFO "scsi%ld: %s: Wait up to %d seconds for " |
1082 | "boot firmware to complete...\n", | ||
1083 | ha->host_no, __func__, FIRMWARE_UP_TOV)); | ||
1084 | max_wait_time = jiffies + (FIRMWARE_UP_TOV * HZ); | ||
1082 | do { | 1085 | do { |
1083 | uint32_t ctrl_status; | 1086 | uint32_t ctrl_status; |
1084 | 1087 | ||
@@ -1092,16 +1095,15 @@ static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) | |||
1092 | if (mbox_status == MBOX_STS_COMMAND_COMPLETE) | 1095 | if (mbox_status == MBOX_STS_COMMAND_COMPLETE) |
1093 | break; | 1096 | break; |
1094 | 1097 | ||
1095 | DEBUG2(printk("scsi%ld: %s: Waiting for boot firmware to " | 1098 | DEBUG2(printk(KERN_INFO "scsi%ld: %s: Waiting for boot " |
1096 | "complete... ctrl_sts=0x%x, remaining=%d\n", | 1099 | "firmware to complete... ctrl_sts=0x%x\n", |
1097 | ha->host_no, __func__, ctrl_status, | 1100 | ha->host_no, __func__, ctrl_status)); |
1098 | max_wait_time)); | ||
1099 | 1101 | ||
1100 | msleep(250); | 1102 | msleep_interruptible(250); |
1101 | } while ((max_wait_time--)); | 1103 | } while (!time_after_eq(jiffies, max_wait_time)); |
1102 | 1104 | ||
1103 | if (mbox_status == MBOX_STS_COMMAND_COMPLETE) { | 1105 | if (mbox_status == MBOX_STS_COMMAND_COMPLETE) { |
1104 | DEBUG(printk("scsi%ld: %s: Firmware has started\n", | 1106 | DEBUG(printk(KERN_INFO "scsi%ld: %s: Firmware has started\n", |
1105 | ha->host_no, __func__)); | 1107 | ha->host_no, __func__)); |
1106 | 1108 | ||
1107 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1109 | spin_lock_irqsave(&ha->hardware_lock, flags); |