Pārlūkot izejas kodu

sfc: Improve reliability of RX queue flushing

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>
Ben Hutchings 16 gadi atpakaļ
vecāks
revīzija
5c8af3b9aa
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      drivers/net/sfc/efx.c

+ 2 - 0
drivers/net/sfc/efx.c

@@ -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
 	/* Isolate the MAC from the TX and RX engines, so that queue
 	 * flushes will complete in a timely fashion. */
 	 * flushes will complete in a timely fashion. */
+	falcon_deconfigure_mac_wrapper(efx);
+	msleep(10); /* Let the Rx FIFO drain */
 	falcon_drain_tx_fifo(efx);
 	falcon_drain_tx_fifo(efx);
 
 
 	/* Stop the kernel transmit interface late, so the watchdog
 	/* Stop the kernel transmit interface late, so the watchdog