]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sh_eth: Fix RX recovery on R-Car in case of RX ring underrun
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Tue, 3 Mar 2015 00:52:08 +0000 (00:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2015 02:30:56 +0000 (21:30 -0500)
commit6ded286555c2518be2f2d438f83dfaba3f0100fd
tree5d2c9472a929d67cf4e1f810b02cc1fd67d45c51
parent7d7355f58ba4f9d68d2fb79864bab4ccb618e4e1
sh_eth: Fix RX recovery on R-Car in case of RX ring underrun

In case of RX ring underrun (RDE), we attempt to reset the software
descriptor pointers (dirty_rx and cur_rx) to match where the hardware
will read the next descriptor from, as that might not be the first
dirty descriptor.  This relies on reading RDFAR, but that register
doesn't exist on all supported chips - specifically, not on the R-Car
chips.  This will result in unpredictable behaviour on those chips
after an RDE.

Make this pointer reset conditional and assume that it isn't needed on
the R-Car chips.  This fix also assumes that RDFAR is never exposed at
offset 0 in the memory map - this is currently true, and a subsequent
commit will fix the ambiguity between offset 0 and no-offset in the
register offset maps.

Fixes: 79fba9f51755 ("net: sh_eth: fix the rxdesc pointer when rx ...")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c