diff options
author | James Smart <james.smart@emulex.com> | 2013-10-10 12:19:53 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 04:58:16 -0400 |
commit | f7bc6434e20589596efbc1fc2bde6d0d78d6168c (patch) | |
tree | dfadd9ea0c90918acfbaee9510cbb81ba70b1a87 /drivers/scsi | |
parent | 7e660100d85af860e7ad763202fff717adcdaacd (diff) |
[SCSI] lpfc 8.3.43: Fix crash after xri limit is reached.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 19 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli4.h | 1 |
2 files changed, 13 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index c913e8cc3b26..443bbca9694c 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -1012,20 +1012,25 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *vport, int num_to_alloc) | |||
1012 | break; | 1012 | break; |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | /* Allocate iotag for psb->cur_iocbq. */ | 1015 | |
1016 | iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); | 1016 | lxri = lpfc_sli4_next_xritag(phba); |
1017 | if (iotag == 0) { | 1017 | if (lxri == NO_XRI) { |
1018 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, | 1018 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, |
1019 | psb->data, psb->dma_handle); | 1019 | psb->data, psb->dma_handle); |
1020 | kfree(psb); | 1020 | kfree(psb); |
1021 | break; | 1021 | break; |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | lxri = lpfc_sli4_next_xritag(phba); | 1024 | /* Allocate iotag for psb->cur_iocbq. */ |
1025 | if (lxri == NO_XRI) { | 1025 | iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); |
1026 | if (iotag == 0) { | ||
1026 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, | 1027 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, |
1027 | psb->data, psb->dma_handle); | 1028 | psb->data, psb->dma_handle); |
1028 | kfree(psb); | 1029 | kfree(psb); |
1030 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | ||
1031 | "3368 Failed to allocated IOTAG for" | ||
1032 | " XRI:0x%x\n", lxri); | ||
1033 | lpfc_sli4_free_xri(phba, lxri); | ||
1029 | break; | 1034 | break; |
1030 | } | 1035 | } |
1031 | psb->cur_iocbq.sli4_lxritag = lxri; | 1036 | psb->cur_iocbq.sli4_lxritag = lxri; |
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index 85120b77aa0e..298c8cd1a89d 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h | |||
@@ -673,6 +673,7 @@ void lpfc_sli4_queue_unset(struct lpfc_hba *); | |||
673 | int lpfc_sli4_post_sgl(struct lpfc_hba *, dma_addr_t, dma_addr_t, uint16_t); | 673 | int lpfc_sli4_post_sgl(struct lpfc_hba *, dma_addr_t, dma_addr_t, uint16_t); |
674 | int lpfc_sli4_repost_scsi_sgl_list(struct lpfc_hba *); | 674 | int lpfc_sli4_repost_scsi_sgl_list(struct lpfc_hba *); |
675 | uint16_t lpfc_sli4_next_xritag(struct lpfc_hba *); | 675 | uint16_t lpfc_sli4_next_xritag(struct lpfc_hba *); |
676 | void lpfc_sli4_free_xri(struct lpfc_hba *, int); | ||
676 | int lpfc_sli4_post_async_mbox(struct lpfc_hba *); | 677 | int lpfc_sli4_post_async_mbox(struct lpfc_hba *); |
677 | int lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *, struct list_head *, int); | 678 | int lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *, struct list_head *, int); |
678 | struct lpfc_cq_event *__lpfc_sli4_cq_event_alloc(struct lpfc_hba *); | 679 | struct lpfc_cq_event *__lpfc_sli4_cq_event_alloc(struct lpfc_hba *); |