aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-08-01 07:33:43 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-06 12:28:03 -0400
commita309a6b6e64b8147b7cfe7388237fb83834f58c9 (patch)
tree6fc55719036a781b65eeb5b6404dcafa3e3f3c88 /drivers/scsi/lpfc/lpfc_sli.c
parent64ba88182962698a8cb75792372c1dddaef82989 (diff)
[SCSI] lpfc 8.1.7 : Fix failing firmware download due to mailbox delays needing to be longer
Fix failing firmware download due to mailbox delays needing to be longer. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index f453fccd67c8..4dc2d584319e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -2197,7 +2197,8 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
2197 return (MBX_NOT_FINISHED); 2197 return (MBX_NOT_FINISHED);
2198 } 2198 }
2199 /* timeout active mbox command */ 2199 /* timeout active mbox command */
2200 mod_timer(&psli->mbox_tmo, jiffies + HZ * LPFC_MBOX_TMO); 2200 mod_timer(&psli->mbox_tmo, (jiffies +
2201 (HZ * lpfc_mbox_tmo_val(phba, mb->mbxCommand))));
2201 } 2202 }
2202 2203
2203 /* Mailbox cmd <cmd> issue */ 2204 /* Mailbox cmd <cmd> issue */
@@ -2257,7 +2258,6 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
2257 break; 2258 break;
2258 2259
2259 case MBX_POLL: 2260 case MBX_POLL:
2260 i = 0;
2261 psli->mbox_active = NULL; 2261 psli->mbox_active = NULL;
2262 if (psli->sli_flag & LPFC_SLI2_ACTIVE) { 2262 if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
2263 /* First read mbox status word */ 2263 /* First read mbox status word */
@@ -2271,11 +2271,14 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
2271 /* Read the HBA Host Attention Register */ 2271 /* Read the HBA Host Attention Register */
2272 ha_copy = readl(phba->HAregaddr); 2272 ha_copy = readl(phba->HAregaddr);
2273 2273
2274 i = lpfc_mbox_tmo_val(phba, mb->mbxCommand);
2275 i *= 1000; /* Convert to ms */
2276
2274 /* Wait for command to complete */ 2277 /* Wait for command to complete */
2275 while (((word0 & OWN_CHIP) == OWN_CHIP) || 2278 while (((word0 & OWN_CHIP) == OWN_CHIP) ||
2276 (!(ha_copy & HA_MBATT) && 2279 (!(ha_copy & HA_MBATT) &&
2277 (phba->hba_state > LPFC_WARM_START))) { 2280 (phba->hba_state > LPFC_WARM_START))) {
2278 if (i++ >= 100) { 2281 if (i-- <= 0) {
2279 psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; 2282 psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
2280 spin_unlock_irqrestore(phba->host->host_lock, 2283 spin_unlock_irqrestore(phba->host->host_lock,
2281 drvr_flag); 2284 drvr_flag);
@@ -2293,7 +2296,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
2293 2296
2294 /* Can be in interrupt context, do not sleep */ 2297 /* Can be in interrupt context, do not sleep */
2295 /* (or might be called with interrupts disabled) */ 2298 /* (or might be called with interrupts disabled) */
2296 mdelay(i); 2299 mdelay(1);
2297 2300
2298 spin_lock_irqsave(phba->host->host_lock, drvr_flag); 2301 spin_lock_irqsave(phba->host->host_lock, drvr_flag);
2299 2302