Commit d245a111 authored by Vladislav Zolotarov's avatar Vladislav Zolotarov Committed by David S. Miller

bnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation

Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2297a2da
...@@ -1336,7 +1336,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms, ...@@ -1336,7 +1336,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
#define BNX2X_ILT_ZALLOC(x, y, size) \ #define BNX2X_ILT_ZALLOC(x, y, size) \
do { \ do { \
x = pci_alloc_consistent(bp->pdev, size, y); \ x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
if (x) \ if (x) \
memset(x, 0, size); \ memset(x, 0, size); \
} while (0) } while (0)
...@@ -1344,7 +1344,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms, ...@@ -1344,7 +1344,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
#define BNX2X_ILT_FREE(x, y, size) \ #define BNX2X_ILT_FREE(x, y, size) \
do { \ do { \
if (x) { \ if (x) { \
pci_free_consistent(bp->pdev, size, x, y); \ dma_free_coherent(&bp->pdev->dev, size, x, y); \
x = NULL; \ x = NULL; \
y = 0; \ y = 0; \
} \ } \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment