svn commit: r184243 - head/sys/pci

Pyun YongHyeon yongari at FreeBSD.org
Sat Oct 25 03:06:48 UTC 2008


Author: yongari
Date: Sat Oct 25 03:06:47 2008
New Revision: 184243
URL: http://svn.freebsd.org/changeset/base/184243

Log:
  After sending stop command to MAC, give hardware chance to drain
  active DMA operation.

Modified:
  head/sys/pci/if_rl.c

Modified: head/sys/pci/if_rl.c
==============================================================================
--- head/sys/pci/if_rl.c	Sat Oct 25 02:52:06 2008	(r184242)
+++ head/sys/pci/if_rl.c	Sat Oct 25 03:06:47 2008	(r184243)
@@ -1834,6 +1834,14 @@ rl_stop(struct rl_softc *sc)
 
 	CSR_WRITE_1(sc, RL_COMMAND, 0x00);
 	CSR_WRITE_2(sc, RL_IMR, 0x0000);
+	for (i = 0; i < RL_TIMEOUT; i++) {
+		DELAY(10);
+		if ((CSR_READ_1(sc, RL_COMMAND) &
+		    (RL_CMD_RX_ENB | RL_CMD_TX_ENB)) == 0)
+			break;
+	}
+	if (i == RL_TIMEOUT)
+		device_printf(sc->rl_dev, "Unable to stop Tx/Rx MAC\n");
 
 	/*
 	 * Free the TX list buffers.


More information about the svn-src-head mailing list