]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gianfar: Fix Tx int miss, dont write IC on-the-fly
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Mon, 24 Feb 2014 10:13:46 +0000 (12:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Feb 2014 00:38:20 +0000 (19:38 -0500)
commitf19015baa23b9130acbf290e1d65c70193e34ff1
treeaa785ebd0bafdcc86316e0a19e944ce77f1bac21
parent0851133bb5ad9d95fceccac9fc67b798041b73e2
gianfar: Fix Tx int miss, dont write IC on-the-fly

Programming the interrupt coalescing (IC) registers while
the controller/DMA is on may incur the loss of one Tx
confirmation interrupt, under certain conditions.  This is
a subtle hw race because it does not occur during a burst
of Tx packets.  It has been observed on p2020 devices that,
if just one packet is being xmit'ed, the Tx confirmation
doesn't trigger and BQL evetually blocks the Tx queues,
followed by Tx timeout and an un-responsive device.
This issue was not apparent prior to introducing BQL
support, as a late Tx confirmation was not an issue back then
and the next burst of Tx frames would have triggered the
Tx confirmation/ Tx ring cleanup anyway.

Bottom line, the hw specifications state that the IC registers
should not be programmed while the Rx/Tx blocks (the DMA) are
enabled. Further more, these registers are currently re-written
with the same values on the processing path, over and over again.
To fix this, rewriting the IC registers has been removed from
the processing path (napi poll).  A complete MAC reset procedure
has been implemented for the ethtool -c option instead, to
reliably update these registers while the controller is stopped.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar_ethtool.c