]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sfc: Improve reliability of RX queue flushing
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 26 Aug 2009 08:18:13 +0000 (08:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2009 00:38:59 +0000 (17:38 -0700)
Reconfiguring the port requires us to flush all DMA queues.  In
repeated testing we have found that RX flushes would sometimes fail
because the RX DMA engine was not properly isolated from the MACs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/efx.c

index d4dc92042d777794c4f267ae10a847e186a12877..07a7e4b8f8fc67a06d1ed8c3ee8a153d923822c1 100644 (file)
@@ -1179,6 +1179,8 @@ static void efx_stop_all(struct efx_nic *efx)
 
        /* Isolate the MAC from the TX and RX engines, so that queue
         * flushes will complete in a timely fashion. */
+       falcon_deconfigure_mac_wrapper(efx);
+       msleep(10); /* Let the Rx FIFO drain */
        falcon_drain_tx_fifo(efx);
 
        /* Stop the kernel transmit interface late, so the watchdog