diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
| -rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 30734caf77e1..2242e9b3ca12 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
| @@ -5362,8 +5362,8 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, | |||
| 5362 | * mailbox command. | 5362 | * mailbox command. |
| 5363 | */ | 5363 | */ |
| 5364 | dma_size = *vpd_size; | 5364 | dma_size = *vpd_size; |
| 5365 | dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, dma_size, | 5365 | dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, dma_size, |
| 5366 | &dmabuf->phys, GFP_KERNEL); | 5366 | &dmabuf->phys, GFP_KERNEL); |
| 5367 | if (!dmabuf->virt) { | 5367 | if (!dmabuf->virt) { |
| 5368 | kfree(dmabuf); | 5368 | kfree(dmabuf); |
| 5369 | return -ENOMEM; | 5369 | return -ENOMEM; |
| @@ -6300,10 +6300,9 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba, | |||
| 6300 | goto free_mem; | 6300 | goto free_mem; |
| 6301 | } | 6301 | } |
| 6302 | 6302 | ||
| 6303 | dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, | 6303 | dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, |
| 6304 | LPFC_RAS_MAX_ENTRY_SIZE, | 6304 | LPFC_RAS_MAX_ENTRY_SIZE, |
| 6305 | &dmabuf->phys, | 6305 | &dmabuf->phys, GFP_KERNEL); |
| 6306 | GFP_KERNEL); | ||
| 6307 | if (!dmabuf->virt) { | 6306 | if (!dmabuf->virt) { |
| 6308 | kfree(dmabuf); | 6307 | kfree(dmabuf); |
| 6309 | rc = -ENOMEM; | 6308 | rc = -ENOMEM; |
| @@ -9408,6 +9407,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
| 9408 | cmnd = CMD_XMIT_SEQUENCE64_CR; | 9407 | cmnd = CMD_XMIT_SEQUENCE64_CR; |
| 9409 | if (phba->link_flag & LS_LOOPBACK_MODE) | 9408 | if (phba->link_flag & LS_LOOPBACK_MODE) |
| 9410 | bf_set(wqe_xo, &wqe->xmit_sequence.wge_ctl, 1); | 9409 | bf_set(wqe_xo, &wqe->xmit_sequence.wge_ctl, 1); |
| 9410 | /* fall through */ | ||
| 9411 | case CMD_XMIT_SEQUENCE64_CR: | 9411 | case CMD_XMIT_SEQUENCE64_CR: |
| 9412 | /* word3 iocb=io_tag32 wqe=reserved */ | 9412 | /* word3 iocb=io_tag32 wqe=reserved */ |
| 9413 | wqe->xmit_sequence.rsvd3 = 0; | 9413 | wqe->xmit_sequence.rsvd3 = 0; |
| @@ -13529,6 +13529,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe) | |||
| 13529 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: | 13529 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: |
| 13530 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13530 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
| 13531 | "2537 Receive Frame Truncated!!\n"); | 13531 | "2537 Receive Frame Truncated!!\n"); |
| 13532 | /* fall through */ | ||
| 13532 | case FC_STATUS_RQ_SUCCESS: | 13533 | case FC_STATUS_RQ_SUCCESS: |
| 13533 | spin_lock_irqsave(&phba->hbalock, iflags); | 13534 | spin_lock_irqsave(&phba->hbalock, iflags); |
| 13534 | lpfc_sli4_rq_release(hrq, drq); | 13535 | lpfc_sli4_rq_release(hrq, drq); |
| @@ -13938,7 +13939,7 @@ lpfc_sli4_nvmet_handle_rcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
| 13938 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: | 13939 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: |
| 13939 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13940 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
| 13940 | "6126 Receive Frame Truncated!!\n"); | 13941 | "6126 Receive Frame Truncated!!\n"); |
| 13941 | /* Drop thru */ | 13942 | /* fall through */ |
| 13942 | case FC_STATUS_RQ_SUCCESS: | 13943 | case FC_STATUS_RQ_SUCCESS: |
| 13943 | spin_lock_irqsave(&phba->hbalock, iflags); | 13944 | spin_lock_irqsave(&phba->hbalock, iflags); |
| 13944 | lpfc_sli4_rq_release(hrq, drq); | 13945 | lpfc_sli4_rq_release(hrq, drq); |
| @@ -14613,9 +14614,9 @@ lpfc_sli4_queue_alloc(struct lpfc_hba *phba, uint32_t page_size, | |||
| 14613 | dmabuf = kzalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); | 14614 | dmabuf = kzalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); |
| 14614 | if (!dmabuf) | 14615 | if (!dmabuf) |
| 14615 | goto out_fail; | 14616 | goto out_fail; |
| 14616 | dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, | 14617 | dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, |
| 14617 | hw_page_size, &dmabuf->phys, | 14618 | hw_page_size, &dmabuf->phys, |
| 14618 | GFP_KERNEL); | 14619 | GFP_KERNEL); |
| 14619 | if (!dmabuf->virt) { | 14620 | if (!dmabuf->virt) { |
| 14620 | kfree(dmabuf); | 14621 | kfree(dmabuf); |
| 14621 | goto out_fail; | 14622 | goto out_fail; |
| @@ -14850,7 +14851,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax) | |||
| 14850 | eq->entry_count); | 14851 | eq->entry_count); |
| 14851 | if (eq->entry_count < 256) | 14852 | if (eq->entry_count < 256) |
| 14852 | return -EINVAL; | 14853 | return -EINVAL; |
| 14853 | /* otherwise default to smallest count (drop through) */ | 14854 | /* fall through - otherwise default to smallest count */ |
| 14854 | case 256: | 14855 | case 256: |
| 14855 | bf_set(lpfc_eq_context_count, &eq_create->u.request.context, | 14856 | bf_set(lpfc_eq_context_count, &eq_create->u.request.context, |
| 14856 | LPFC_EQ_CNT_256); | 14857 | LPFC_EQ_CNT_256); |
| @@ -14981,7 +14982,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
| 14981 | LPFC_CQ_CNT_WORD7); | 14982 | LPFC_CQ_CNT_WORD7); |
| 14982 | break; | 14983 | break; |
| 14983 | } | 14984 | } |
| 14984 | /* Fall Thru */ | 14985 | /* fall through */ |
| 14985 | default: | 14986 | default: |
| 14986 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14987 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
| 14987 | "0361 Unsupported CQ count: " | 14988 | "0361 Unsupported CQ count: " |
| @@ -14992,7 +14993,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
| 14992 | status = -EINVAL; | 14993 | status = -EINVAL; |
| 14993 | goto out; | 14994 | goto out; |
| 14994 | } | 14995 | } |
| 14995 | /* otherwise default to smallest count (drop through) */ | 14996 | /* fall through - otherwise default to smallest count */ |
| 14996 | case 256: | 14997 | case 256: |
| 14997 | bf_set(lpfc_cq_context_count, &cq_create->u.request.context, | 14998 | bf_set(lpfc_cq_context_count, &cq_create->u.request.context, |
| 14998 | LPFC_CQ_CNT_256); | 14999 | LPFC_CQ_CNT_256); |
| @@ -15152,7 +15153,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp, | |||
| 15152 | LPFC_CQ_CNT_WORD7); | 15153 | LPFC_CQ_CNT_WORD7); |
| 15153 | break; | 15154 | break; |
| 15154 | } | 15155 | } |
| 15155 | /* Fall Thru */ | 15156 | /* fall through */ |
| 15156 | default: | 15157 | default: |
| 15157 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15158 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
| 15158 | "3118 Bad CQ count. (%d)\n", | 15159 | "3118 Bad CQ count. (%d)\n", |
| @@ -15161,7 +15162,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp, | |||
| 15161 | status = -EINVAL; | 15162 | status = -EINVAL; |
| 15162 | goto out; | 15163 | goto out; |
| 15163 | } | 15164 | } |
| 15164 | /* otherwise default to smallest (drop thru) */ | 15165 | /* fall through - otherwise default to smallest */ |
| 15165 | case 256: | 15166 | case 256: |
| 15166 | bf_set(lpfc_mbx_cq_create_set_cqe_cnt, | 15167 | bf_set(lpfc_mbx_cq_create_set_cqe_cnt, |
| 15167 | &cq_set->u.request, LPFC_CQ_CNT_256); | 15168 | &cq_set->u.request, LPFC_CQ_CNT_256); |
| @@ -15433,7 +15434,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq, | |||
| 15433 | status = -EINVAL; | 15434 | status = -EINVAL; |
| 15434 | goto out; | 15435 | goto out; |
| 15435 | } | 15436 | } |
| 15436 | /* otherwise default to smallest count (drop through) */ | 15437 | /* fall through - otherwise default to smallest count */ |
| 15437 | case 16: | 15438 | case 16: |
| 15438 | bf_set(lpfc_mq_context_ring_size, | 15439 | bf_set(lpfc_mq_context_ring_size, |
| 15439 | &mq_create_ext->u.request.context, | 15440 | &mq_create_ext->u.request.context, |
| @@ -15852,7 +15853,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, | |||
| 15852 | status = -EINVAL; | 15853 | status = -EINVAL; |
| 15853 | goto out; | 15854 | goto out; |
| 15854 | } | 15855 | } |
| 15855 | /* otherwise default to smallest count (drop through) */ | 15856 | /* fall through - otherwise default to smallest count */ |
| 15856 | case 512: | 15857 | case 512: |
| 15857 | bf_set(lpfc_rq_context_rqe_count, | 15858 | bf_set(lpfc_rq_context_rqe_count, |
| 15858 | &rq_create->u.request.context, | 15859 | &rq_create->u.request.context, |
| @@ -15989,7 +15990,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, | |||
| 15989 | status = -EINVAL; | 15990 | status = -EINVAL; |
| 15990 | goto out; | 15991 | goto out; |
| 15991 | } | 15992 | } |
| 15992 | /* otherwise default to smallest count (drop through) */ | 15993 | /* fall through - otherwise default to smallest count */ |
| 15993 | case 512: | 15994 | case 512: |
| 15994 | bf_set(lpfc_rq_context_rqe_count, | 15995 | bf_set(lpfc_rq_context_rqe_count, |
| 15995 | &rq_create->u.request.context, | 15996 | &rq_create->u.request.context, |
