diff options
author | James Smart <james.smart@emulex.com> | 2010-06-07 15:24:12 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:32 -0400 |
commit | b92938b41ee84b83347b62baa6daa0d06a742e94 (patch) | |
tree | 6418e92113a9b779aec03e1fc4f94cfe849afe0f | |
parent | 6e7288d9a4b6691bf13fb07e3593d70d725d0737 (diff) |
[SCSI] lpfc 8.3.13: SCSI specific changes
- Fix hba_queue_depth to reflect actual available XRIs
- Add support for new SLER specific firmware status codes.
- Free SCSI buffer when iotag allocation fails.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 8 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 7 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 5 |
3 files changed, 17 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index bc813fd99d5e..8887fd831a2c 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -3124,6 +3124,14 @@ typedef struct { | |||
3124 | #define IOERR_BUFFER_SHORTAGE 0x28 | 3124 | #define IOERR_BUFFER_SHORTAGE 0x28 |
3125 | #define IOERR_DEFAULT 0x29 | 3125 | #define IOERR_DEFAULT 0x29 |
3126 | #define IOERR_CNT 0x2A | 3126 | #define IOERR_CNT 0x2A |
3127 | #define IOERR_SLER_FAILURE 0x46 | ||
3128 | #define IOERR_SLER_CMD_RCV_FAILURE 0x47 | ||
3129 | #define IOERR_SLER_REC_RJT_ERR 0x48 | ||
3130 | #define IOERR_SLER_REC_SRR_RETRY_ERR 0x49 | ||
3131 | #define IOERR_SLER_SRR_RJT_ERR 0x4A | ||
3132 | #define IOERR_SLER_RRQ_RJT_ERR 0x4C | ||
3133 | #define IOERR_SLER_RRQ_RETRY_ERR 0x4D | ||
3134 | #define IOERR_SLER_ABTS_ERR 0x4E | ||
3127 | 3135 | ||
3128 | #define IOERR_DRVR_MASK 0x100 | 3136 | #define IOERR_DRVR_MASK 0x100 |
3129 | #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */ | 3137 | #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */ |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 8da8fc69227f..62585870f083 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -5563,9 +5563,12 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) | |||
5563 | mempool_free(pmb, phba->mbox_mem_pool); | 5563 | mempool_free(pmb, phba->mbox_mem_pool); |
5564 | 5564 | ||
5565 | /* Reset the DFT_HBA_Q_DEPTH to the max xri */ | 5565 | /* Reset the DFT_HBA_Q_DEPTH to the max xri */ |
5566 | if (phba->cfg_hba_queue_depth > (phba->sli4_hba.max_cfg_param.max_xri)) | 5566 | if (phba->cfg_hba_queue_depth > |
5567 | (phba->sli4_hba.max_cfg_param.max_xri - | ||
5568 | lpfc_sli4_get_els_iocb_cnt(phba))) | ||
5567 | phba->cfg_hba_queue_depth = | 5569 | phba->cfg_hba_queue_depth = |
5568 | phba->sli4_hba.max_cfg_param.max_xri; | 5570 | phba->sli4_hba.max_cfg_param.max_xri - |
5571 | lpfc_sli4_get_els_iocb_cnt(phba); | ||
5569 | return rc; | 5572 | return rc; |
5570 | } | 5573 | } |
5571 | 5574 | ||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f4a3b2e79eea..f7a92653467a 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -774,6 +774,8 @@ lpfc_new_scsi_buf_s4(struct lpfc_vport *vport, int num_to_alloc) | |||
774 | /* Allocate iotag for psb->cur_iocbq. */ | 774 | /* Allocate iotag for psb->cur_iocbq. */ |
775 | iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); | 775 | iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); |
776 | if (iotag == 0) { | 776 | if (iotag == 0) { |
777 | pci_pool_free(phba->lpfc_scsi_dma_buf_pool, | ||
778 | psb->data, psb->dma_handle); | ||
777 | kfree(psb); | 779 | kfree(psb); |
778 | break; | 780 | break; |
779 | } | 781 | } |
@@ -2363,7 +2365,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
2363 | case IOSTAT_LOCAL_REJECT: | 2365 | case IOSTAT_LOCAL_REJECT: |
2364 | if (lpfc_cmd->result == IOERR_INVALID_RPI || | 2366 | if (lpfc_cmd->result == IOERR_INVALID_RPI || |
2365 | lpfc_cmd->result == IOERR_NO_RESOURCES || | 2367 | lpfc_cmd->result == IOERR_NO_RESOURCES || |
2366 | lpfc_cmd->result == IOERR_ABORT_REQUESTED) { | 2368 | lpfc_cmd->result == IOERR_ABORT_REQUESTED || |
2369 | lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) { | ||
2367 | cmd->result = ScsiResult(DID_REQUEUE, 0); | 2370 | cmd->result = ScsiResult(DID_REQUEUE, 0); |
2368 | break; | 2371 | break; |
2369 | } | 2372 | } |