sh_eth: advance 'rxdesc' later in sh_eth_ring_format()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Mon, 7 Mar 2016 22:37:09 +0000 (01:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Mar 2016 21:06:49 +0000 (16:06 -0500)
commitd0ba913488dc8c55d1880f5ed34f096dc45fb05d
treefcd16efd2a857d1a8ceb31f9fe92a8f9bc1ecb22
parentc1b7fca65070bfadca94dd53a4e6b71cd4f69715
sh_eth: advance 'rxdesc' later in sh_eth_ring_format()

Iff dma_map_single() fails, 'rxdesc'  should point  to the last filled RX
descriptor, so  that it can be marked as the last one, however the driver
would have  already  advanced it by that time. In order to fix that, only
fill  an RX descriptor  once all the data for it is ready.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c