diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-04-07 10:16:05 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-10 08:53:12 -0400 |
commit | 97eab63490452f0a5242fa94ddaa9b727d69cb25 (patch) | |
tree | b85d3bf226d4acf208981f1fcdbc9fde98d1c6a6 /drivers/scsi/lpfc/lpfc_sli.c | |
parent | 9b37960523afb1b519b406dec4c4f3155b82b2ba (diff) |
[SCSI] lpfc 8.2.6 : Miscellaneous Fixes
Miscellaneous Fixes
- Allow WRITE_VPARAM command when the virtual port is in a stopped state
- Fixed handling of our queue depth max that was unconditionally raising
the depth on all vports, rather than just the vport affected.
- Fix race in interrupt handler for mailbox processing that did not take
out the host lock.
- Removed unused functions: find_node, findnode_rpi, and fabric_abort_flogi
- Correct misspelled word unsolicited in message 0146
- Correct HW-error 5 handling - it should not reset the adapter
- Correct handling of IOCBs, which did not null out our pCmd field before
invoking the midlayer io done function.
- Changed our maximum supported target id to 4096
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 741e94af4793..70a0a9eab211 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -3481,26 +3481,21 @@ lpfc_sli_hba_down(struct lpfc_hba *phba) | |||
3481 | phba->pport->work_port_events &= ~WORKER_MBOX_TMO; | 3481 | phba->pport->work_port_events &= ~WORKER_MBOX_TMO; |
3482 | spin_unlock(&phba->pport->work_port_lock); | 3482 | spin_unlock(&phba->pport->work_port_lock); |
3483 | 3483 | ||
3484 | /* Return any pending or completed mbox cmds */ | ||
3485 | list_splice_init(&phba->sli.mboxq, &completions); | ||
3484 | if (psli->mbox_active) { | 3486 | if (psli->mbox_active) { |
3485 | list_add_tail(&psli->mbox_active->list, &completions); | 3487 | list_add_tail(&psli->mbox_active->list, &completions); |
3486 | psli->mbox_active = NULL; | 3488 | psli->mbox_active = NULL; |
3487 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | 3489 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; |
3488 | } | 3490 | } |
3489 | |||
3490 | /* Return any pending or completed mbox cmds */ | ||
3491 | list_splice_init(&phba->sli.mboxq, &completions); | ||
3492 | list_splice_init(&phba->sli.mboxq_cmpl, &completions); | 3491 | list_splice_init(&phba->sli.mboxq_cmpl, &completions); |
3493 | INIT_LIST_HEAD(&psli->mboxq); | ||
3494 | INIT_LIST_HEAD(&psli->mboxq_cmpl); | ||
3495 | |||
3496 | spin_unlock_irqrestore(&phba->hbalock, flags); | 3492 | spin_unlock_irqrestore(&phba->hbalock, flags); |
3497 | 3493 | ||
3498 | while (!list_empty(&completions)) { | 3494 | while (!list_empty(&completions)) { |
3499 | list_remove_head(&completions, pmb, LPFC_MBOXQ_t, list); | 3495 | list_remove_head(&completions, pmb, LPFC_MBOXQ_t, list); |
3500 | pmb->mb.mbxStatus = MBX_NOT_FINISHED; | 3496 | pmb->mb.mbxStatus = MBX_NOT_FINISHED; |
3501 | if (pmb->mbox_cmpl) { | 3497 | if (pmb->mbox_cmpl) |
3502 | pmb->mbox_cmpl(phba,pmb); | 3498 | pmb->mbox_cmpl(phba,pmb); |
3503 | } | ||
3504 | } | 3499 | } |
3505 | return 1; | 3500 | return 1; |
3506 | } | 3501 | } |
@@ -4201,6 +4196,7 @@ lpfc_intr_handler(int irq, void *dev_id) | |||
4201 | phba->pport->stopped = 1; | 4196 | phba->pport->stopped = 1; |
4202 | } | 4197 | } |
4203 | 4198 | ||
4199 | spin_lock(&phba->hbalock); | ||
4204 | if ((work_ha_copy & HA_MBATT) && | 4200 | if ((work_ha_copy & HA_MBATT) && |
4205 | (phba->sli.mbox_active)) { | 4201 | (phba->sli.mbox_active)) { |
4206 | pmb = phba->sli.mbox_active; | 4202 | pmb = phba->sli.mbox_active; |
@@ -4211,6 +4207,7 @@ lpfc_intr_handler(int irq, void *dev_id) | |||
4211 | /* First check out the status word */ | 4207 | /* First check out the status word */ |
4212 | lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof(uint32_t)); | 4208 | lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof(uint32_t)); |
4213 | if (pmbox->mbxOwner != OWN_HOST) { | 4209 | if (pmbox->mbxOwner != OWN_HOST) { |
4210 | spin_unlock(&phba->hbalock); | ||
4214 | /* | 4211 | /* |
4215 | * Stray Mailbox Interrupt, mbxCommand <cmd> | 4212 | * Stray Mailbox Interrupt, mbxCommand <cmd> |
4216 | * mbxStatus <status> | 4213 | * mbxStatus <status> |
@@ -4226,10 +4223,10 @@ lpfc_intr_handler(int irq, void *dev_id) | |||
4226 | /* clear mailbox attention bit */ | 4223 | /* clear mailbox attention bit */ |
4227 | work_ha_copy &= ~HA_MBATT; | 4224 | work_ha_copy &= ~HA_MBATT; |
4228 | } else { | 4225 | } else { |
4226 | phba->sli.mbox_active = NULL; | ||
4227 | spin_unlock(&phba->hbalock); | ||
4229 | phba->last_completion_time = jiffies; | 4228 | phba->last_completion_time = jiffies; |
4230 | del_timer(&phba->sli.mbox_tmo); | 4229 | del_timer(&phba->sli.mbox_tmo); |
4231 | |||
4232 | phba->sli.mbox_active = NULL; | ||
4233 | if (pmb->mbox_cmpl) { | 4230 | if (pmb->mbox_cmpl) { |
4234 | lpfc_sli_pcimem_bcopy(mbox, pmbox, | 4231 | lpfc_sli_pcimem_bcopy(mbox, pmbox, |
4235 | MAILBOX_CMD_SIZE); | 4232 | MAILBOX_CMD_SIZE); |
@@ -4282,7 +4279,8 @@ lpfc_intr_handler(int irq, void *dev_id) | |||
4282 | spin_unlock(&phba->pport->work_port_lock); | 4279 | spin_unlock(&phba->pport->work_port_lock); |
4283 | lpfc_mbox_cmpl_put(phba, pmb); | 4280 | lpfc_mbox_cmpl_put(phba, pmb); |
4284 | } | 4281 | } |
4285 | } | 4282 | } else |
4283 | spin_unlock(&phba->hbalock); | ||
4286 | if ((work_ha_copy & HA_MBATT) && | 4284 | if ((work_ha_copy & HA_MBATT) && |
4287 | (phba->sli.mbox_active == NULL)) { | 4285 | (phba->sli.mbox_active == NULL)) { |
4288 | send_current_mbox: | 4286 | send_current_mbox: |