diff options
Diffstat (limited to 'drivers/infiniband/hw/hfi1/sdma.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/sdma.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index b84356e1a4c1..96897a91fb0a 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c | |||
@@ -1453,12 +1453,9 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) | |||
1453 | timer_setup(&sde->err_progress_check_timer, | 1453 | timer_setup(&sde->err_progress_check_timer, |
1454 | sdma_err_progress_check, 0); | 1454 | sdma_err_progress_check, 0); |
1455 | 1455 | ||
1456 | sde->descq = dma_zalloc_coherent( | 1456 | sde->descq = dma_alloc_coherent(&dd->pcidev->dev, |
1457 | &dd->pcidev->dev, | 1457 | descq_cnt * sizeof(u64[2]), |
1458 | descq_cnt * sizeof(u64[2]), | 1458 | &sde->descq_phys, GFP_KERNEL); |
1459 | &sde->descq_phys, | ||
1460 | GFP_KERNEL | ||
1461 | ); | ||
1462 | if (!sde->descq) | 1459 | if (!sde->descq) |
1463 | goto bail; | 1460 | goto bail; |
1464 | sde->tx_ring = | 1461 | sde->tx_ring = |
@@ -1471,24 +1468,18 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) | |||
1471 | 1468 | ||
1472 | dd->sdma_heads_size = L1_CACHE_BYTES * num_engines; | 1469 | dd->sdma_heads_size = L1_CACHE_BYTES * num_engines; |
1473 | /* Allocate memory for DMA of head registers to memory */ | 1470 | /* Allocate memory for DMA of head registers to memory */ |
1474 | dd->sdma_heads_dma = dma_zalloc_coherent( | 1471 | dd->sdma_heads_dma = dma_alloc_coherent(&dd->pcidev->dev, |
1475 | &dd->pcidev->dev, | 1472 | dd->sdma_heads_size, |
1476 | dd->sdma_heads_size, | 1473 | &dd->sdma_heads_phys, |
1477 | &dd->sdma_heads_phys, | 1474 | GFP_KERNEL); |
1478 | GFP_KERNEL | ||
1479 | ); | ||
1480 | if (!dd->sdma_heads_dma) { | 1475 | if (!dd->sdma_heads_dma) { |
1481 | dd_dev_err(dd, "failed to allocate SendDMA head memory\n"); | 1476 | dd_dev_err(dd, "failed to allocate SendDMA head memory\n"); |
1482 | goto bail; | 1477 | goto bail; |
1483 | } | 1478 | } |
1484 | 1479 | ||
1485 | /* Allocate memory for pad */ | 1480 | /* Allocate memory for pad */ |
1486 | dd->sdma_pad_dma = dma_zalloc_coherent( | 1481 | dd->sdma_pad_dma = dma_alloc_coherent(&dd->pcidev->dev, sizeof(u32), |
1487 | &dd->pcidev->dev, | 1482 | &dd->sdma_pad_phys, GFP_KERNEL); |
1488 | sizeof(u32), | ||
1489 | &dd->sdma_pad_phys, | ||
1490 | GFP_KERNEL | ||
1491 | ); | ||
1492 | if (!dd->sdma_pad_dma) { | 1483 | if (!dd->sdma_pad_dma) { |
1493 | dd_dev_err(dd, "failed to allocate SendDMA pad memory\n"); | 1484 | dd_dev_err(dd, "failed to allocate SendDMA pad memory\n"); |
1494 | goto bail; | 1485 | goto bail; |