diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-04-25 09:51:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-06 10:33:12 -0400 |
commit | 1dcb58e5680b6673bf984696d3d8b9033b6e41bf (patch) | |
tree | 7421ad398ef2ee04d2c7b22bb975219593885f01 /drivers/scsi/lpfc/lpfc_scsi.c | |
parent | e555db930f7512491485cfc43df4306192835373 (diff) |
[SCSI] lpfc 8.1.12 : Misc bug fixes and code cleanup
Misc bug fixes and code cleanup:
- Fix system hang while running on systems with IOMMU
- Fix use after free issues with rports
- Don't free mailbox structure if it's still on the mboxq list
- Decrement txq_cnt rather than txcmplq_cnt when parsing the txq list
- Use msleep for long delays to prevent soft lockup bug check
- Don't remove node during dev_loss_tmo if discovery is active
- Fix memory leaks in get/reset statistics and link attention paths
- Fixed lpfc_ns_rsp to handle entire GID_FT response.
- mbox interface should use MAILBOX_CMD_SIZE rather than sizeof(MAILBOX_t)
- Fixed bug check in add_timer.
- Fixup messages 0116, 0117, and 0128 to report ELS I/O tag.
- Remove unused parameter to lpfc_cleanup.
- Change mailbox timeout handling.
- Remove unused buflist. Code cleanup.
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_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index c3e68e0d8f74..28dbd6be72ee 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -146,6 +146,10 @@ lpfc_get_scsi_buf(struct lpfc_hba * phba) | |||
146 | 146 | ||
147 | spin_lock_irqsave(&phba->scsi_buf_list_lock, iflag); | 147 | spin_lock_irqsave(&phba->scsi_buf_list_lock, iflag); |
148 | list_remove_head(scsi_buf_list, lpfc_cmd, struct lpfc_scsi_buf, list); | 148 | list_remove_head(scsi_buf_list, lpfc_cmd, struct lpfc_scsi_buf, list); |
149 | if (lpfc_cmd) { | ||
150 | lpfc_cmd->seg_cnt = 0; | ||
151 | lpfc_cmd->nonsg_phys = 0; | ||
152 | } | ||
149 | spin_unlock_irqrestore(&phba->scsi_buf_list_lock, iflag); | 153 | spin_unlock_irqrestore(&phba->scsi_buf_list_lock, iflag); |
150 | return lpfc_cmd; | 154 | return lpfc_cmd; |
151 | } | 155 | } |
@@ -466,10 +470,10 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
466 | 470 | ||
467 | result = cmd->result; | 471 | result = cmd->result; |
468 | sdev = cmd->device; | 472 | sdev = cmd->device; |
473 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | ||
469 | cmd->scsi_done(cmd); | 474 | cmd->scsi_done(cmd); |
470 | 475 | ||
471 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { | 476 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { |
472 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | ||
473 | lpfc_release_scsi_buf(phba, lpfc_cmd); | 477 | lpfc_release_scsi_buf(phba, lpfc_cmd); |
474 | return; | 478 | return; |
475 | } | 479 | } |
@@ -527,7 +531,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
527 | } | 531 | } |
528 | } | 532 | } |
529 | 533 | ||
530 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | ||
531 | lpfc_release_scsi_buf(phba, lpfc_cmd); | 534 | lpfc_release_scsi_buf(phba, lpfc_cmd); |
532 | } | 535 | } |
533 | 536 | ||