net: mvpp2: allocate zeroed tx descriptors
authorYan Markman <ymarkman@marvell.com>
Thu, 30 Nov 2017 09:49:46 +0000 (10:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:55 +0000 (11:07 +0100)
commitd4ec37fab6008e17a1f2af26db8c6a801c9f7ec6
treef6f7d3277218f5b9fe72c56c515fe6267062975f
parent801f3b0c40da62ddc27dbd3e06331c8144cf394e
net: mvpp2: allocate zeroed tx descriptors

[ Upstream commit a154f8e399a063137fc42b961f437248d55ece29 ]

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: 3f518509dedc ("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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2.c