]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: macb: restart tx after tx used bit read
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Mon, 17 Dec 2018 10:02:42 +0000 (10:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:14:44 +0000 (17:14 +0100)
commit6e12baae0001e0dee2c349b2d5cd8f3f463e3856
tree0794360b83a734286c840d99f74f78b75638b9ae
parent95b4b711444a4414bccfc0b1fe3c5096675ab8f7
net: macb: restart tx after tx used bit read

[ Upstream commit 4298388574dae6168fa8940b3edc7ba965e8a7ab ]

On some platforms (currently detected only on SAMA5D4) TX might stuck
even the pachets are still present in DMA memories and TX start was
issued for them. This happens due to race condition between MACB driver
updating next TX buffer descriptor to be used and IP reading the same
descriptor. In such a case, the "TX USED BIT READ" interrupt is asserted.
GEM/MACB user guide specifies that if a "TX USED BIT READ" interrupt
is asserted TX must be restarted. Restart TX if used bit is read and
packets are present in software TX queue. Packets are removed from software
TX queue if TX was successful for them (see macb_tx_interrupt()).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cadence/macb_main.c