Newer 8168x and 810x chipsets have a different way of stopping the chipset.
authornaddy <naddy@openbsd.org>
Wed, 14 Jul 2010 19:24:27 +0000 (19:24 +0000)
committernaddy <naddy@openbsd.org>
Wed, 14 Jul 2010 19:24:27 +0000 (19:24 +0000)
From FreeBSD via Brad.

sys/dev/ic/re.c

index 203119a..ecd58ce 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: re.c,v 1.122 2010/07/10 21:00:34 naddy Exp $  */
+/*     $OpenBSD: re.c,v 1.123 2010/07/14 19:24:27 naddy Exp $  */
 /*     $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $   */
 /*
  * Copyright (c) 1997, 1998-2003
@@ -2178,7 +2178,12 @@ re_stop(struct ifnet *ifp, int disable)
 
        mii_down(&sc->sc_mii);
 
-       CSR_WRITE_1(sc, RL_COMMAND, 0x00);
+       if (sc->rl_flags & RL_FLAG_CMDSTOP)
+               CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_STOPREQ | RL_CMD_TX_ENB |
+                   RL_CMD_RX_ENB);
+       else
+               CSR_WRITE_1(sc, RL_COMMAND, 0x00);
+       DELAY(1000);
        CSR_WRITE_2(sc, RL_IMR, 0x0000);
        CSR_WRITE_2(sc, RL_ISR, 0xFFFF);