diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 6dfdf9cee8a9..96b96e2ab91a 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -1071,9 +1071,9 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, else req_memsize = sizeof(struct tcp_connect_and_offload_in_v1); - nonemb_cmd.va = pci_alloc_consistent(phba->ctrl.pdev, + nonemb_cmd.va = dma_alloc_coherent(&phba->ctrl.pdev->dev, req_memsize, - &nonemb_cmd.dma); + &nonemb_cmd.dma, GFP_KERNEL); if (nonemb_cmd.va == NULL) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, @@ -1091,7 +1091,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, "BS_%d : mgmt_open_connection Failed for cid=%d\n", beiscsi_ep->ep_cid); - pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, + dma_free_coherent(&phba->ctrl.pdev->dev, nonemb_cmd.size, nonemb_cmd.va, nonemb_cmd.dma); beiscsi_free_ep(beiscsi_ep); return -EAGAIN; @@ -1104,8 +1104,9 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, "BS_%d : mgmt_open_connection Failed"); if (ret != -EBUSY) - pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, - nonemb_cmd.va, nonemb_cmd.dma); + dma_free_coherent(&phba->ctrl.pdev->dev, + nonemb_cmd.size, nonemb_cmd.va, + nonemb_cmd.dma); beiscsi_free_ep(beiscsi_ep); return ret; @@ -1118,7 +1119,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : mgmt_open_connection Success\n"); - pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, + dma_free_coherent(&phba->ctrl.pdev->dev, nonemb_cmd.size, nonemb_cmd.va, nonemb_cmd.dma); return 0; } |