mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 02:15:57 +00:00
bnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2297a2da5a
commit
d245a11112
@ -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) \
|
||||
do { \
|
||||
x = pci_alloc_consistent(bp->pdev, size, y); \
|
||||
x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
|
||||
if (x) \
|
||||
memset(x, 0, size); \
|
||||
} while (0)
|
||||
@ -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) \
|
||||
do { \
|
||||
if (x) { \
|
||||
pci_free_consistent(bp->pdev, size, x, y); \
|
||||
dma_free_coherent(&bp->pdev->dev, size, x, y); \
|
||||
x = NULL; \
|
||||
y = 0; \
|
||||
} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user