ll_temac: Reset dma descriptors indexes on ndo_open
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Tue, 1 Oct 2013 06:17:10 +0000 (08:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 23:08:30 +0000 (16:08 -0700)
commitc7bd0696131d1cc596afea05d06c6fee5b7a51ca
treeb3a381b30d5e6ef4d6bf83bb6093efc8f0e5433b
parentef04c1db0aef35f8d006d18c79cacd11925078ec
ll_temac: Reset dma descriptors indexes on ndo_open

[ Upstream commit 7167cf0e8cd10287b7912b9ffcccd9616f382922 ]

The dma descriptors indexes are only initialized on the probe function.

If a packet is on the buffer when temac_stop is called, the dma
descriptors indexes can be left on a incorrect state where no other
package can be sent.

So an interface could be left in an usable state after ifdow/ifup.

This patch makes sure that the descriptors indexes are in a proper
status when the device is open.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/xilinx/ll_temac_main.c