diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c4b19d094d39..ce0a1a1c4792 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -5756,12 +5756,13 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5756 | uint8_t cmnd; | 5756 | uint8_t cmnd; |
5757 | uint16_t xritag; | 5757 | uint16_t xritag; |
5758 | struct ulp_bde64 *bpl = NULL; | 5758 | struct ulp_bde64 *bpl = NULL; |
5759 | uint32_t els_id = ELS_ID_DEFAULT; | ||
5759 | 5760 | ||
5760 | fip = phba->hba_flag & HBA_FIP_SUPPORT; | 5761 | fip = phba->hba_flag & HBA_FIP_SUPPORT; |
5761 | /* The fcp commands will set command type */ | 5762 | /* The fcp commands will set command type */ |
5762 | if (iocbq->iocb_flag & LPFC_IO_FCP) | 5763 | if (iocbq->iocb_flag & LPFC_IO_FCP) |
5763 | command_type = FCP_COMMAND; | 5764 | command_type = FCP_COMMAND; |
5764 | else if (fip && (iocbq->iocb_flag & LPFC_FIP_ELS)) | 5765 | else if (fip && (iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK)) |
5765 | command_type = ELS_COMMAND_FIP; | 5766 | command_type = ELS_COMMAND_FIP; |
5766 | else | 5767 | else |
5767 | command_type = ELS_COMMAND_NON_FIP; | 5768 | command_type = ELS_COMMAND_NON_FIP; |
@@ -5822,6 +5823,13 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5822 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, ct); | 5823 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, ct); |
5823 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); | 5824 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); |
5824 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ | 5825 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ |
5826 | |||
5827 | if (command_type == ELS_COMMAND_FIP) { | ||
5828 | els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK) | ||
5829 | >> LPFC_FIP_ELS_ID_SHIFT); | ||
5830 | } | ||
5831 | bf_set(lpfc_wqe_gen_els_id, &wqe->generic, els_id); | ||
5832 | |||
5825 | break; | 5833 | break; |
5826 | case CMD_XMIT_SEQUENCE64_CR: | 5834 | case CMD_XMIT_SEQUENCE64_CR: |
5827 | /* word3 iocb=io_tag32 wqe=payload_offset */ | 5835 | /* word3 iocb=io_tag32 wqe=payload_offset */ |
@@ -11282,7 +11290,7 @@ lpfc_sli4_handle_received_buffer(struct lpfc_hba *phba, | |||
11282 | } | 11290 | } |
11283 | fcfi = bf_get(lpfc_rcqe_fcf_id, &dmabuf->cq_event.cqe.rcqe_cmpl); | 11291 | fcfi = bf_get(lpfc_rcqe_fcf_id, &dmabuf->cq_event.cqe.rcqe_cmpl); |
11284 | vport = lpfc_fc_frame_to_vport(phba, fc_hdr, fcfi); | 11292 | vport = lpfc_fc_frame_to_vport(phba, fc_hdr, fcfi); |
11285 | if (!vport) { | 11293 | if (!vport || !(vport->vpi_state & LPFC_VPI_REGISTERED)) { |
11286 | /* throw out the frame */ | 11294 | /* throw out the frame */ |
11287 | lpfc_in_buf_free(phba, &dmabuf->dbuf); | 11295 | lpfc_in_buf_free(phba, &dmabuf->dbuf); |
11288 | return; | 11296 | return; |