]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: allocate zeroed tx descriptors
authorYan Markman <ymarkman@marvell.com>
Thu, 30 Nov 2017 09:49:46 +0000 (10:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Nov 2017 14:12:46 +0000 (09:12 -0500)
commitfe0875a1ce51d447f34151aa6b7c0b8da3c7a312
tree45f0606df6b9718f9badda498e91e2788319f3e2
parent9df6b4f17261224bcc30c228a3e8a7ada3600d27
net: mvpp2: allocate zeroed tx descriptors

Reserved and unused fields in the Tx descriptors should be 0. The PPv2
driver doesn't clear them at run-time (for performance reasons) but
these descriptors aren't zeroed when allocated, which can lead to
unpredictable behaviors. This patch fixes this by using
dma_zalloc_coherent instead of dma_alloc_coherent.

Fixes: dc37d05f9885 ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Yan Markman <ymarkman@marvell.com>
[Antoine: commit message]
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c