diff options
author | yongari <yongari@FreeBSD.org> | 2008-10-25 03:06:47 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-10-25 03:06:47 +0000 |
commit | 7a59a01ca5d01a94d5e3848c5afb3ddfa4f91d15 (patch) | |
tree | c7c6dab56b884a0f56cdfc4fa5cb8946e31f2f11 /sys | |
parent | 33ba86e90cd1ef590f59811b94d51775765eaadc (diff) | |
download | FreeBSD-src-7a59a01ca5d01a94d5e3848c5afb3ddfa4f91d15.zip FreeBSD-src-7a59a01ca5d01a94d5e3848c5afb3ddfa4f91d15.tar.gz |
After sending stop command to MAC, give hardware chance to drain
active DMA operation.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/if_rl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 19005e0..0026798 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -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. |