Subject: Re: ex0 driver trouble in -current
To: None <feico@pasta.cs.uit.no>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: current-users
Date: 04/24/2001 05:06:21
Hi,
Subject: Re: Re: ex0 driver trouble in -current
Message-ID: <20010423130003.I12888@pasta.cs.uit.no>
$ I applied the patch, but the same problem pops up. It is definately
$ power-management related as the problem disappears when I start apmd
$ with option -a to ignore BIOS-initiated sleep events. Interface goes
$ `down' (without th=E6t fact showing up in ifconfig) but when the syst=
em
$ gets makes up (by keypress) it does not come up again. Only explicit
$ ifconfig down and up awakes the interface again.
Would you please try next patch?
Regards!
---
Masanori Kanaoka kanaoka@ann.hi-ho.ne.jp
Index: elinkxl.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /ftp/cvs/syssrc/sys/dev/ic/elinkxl.c,v
retrieving revision 1.47
diff -u -r1.47 elinkxl.c
--- elinkxl.c 2001/01/30 19:27:39 1.47
+++ elinkxl.c 2001/04/23 19:56:45
@@ -1574,6 +1574,7 @@
bus_dmamem_free(sc->sc_dmat, &sc->sc_useg, sc->sc_urseg);
=
shutdownhook_disestablish(sc->sc_sdhook);
+ powerhook_disestablish(sc->sc_powerhook);
=
return (0);
}
@@ -1832,14 +1833,24 @@
int s;
=
s =3D splnet();
- if (why !=3D PWR_RESUME) {
+ switch (why) {
+ case PWR_SUSPEND:
+ case PWR_STANDBY:
ex_stop(ifp, 0);
if (sc->power !=3D NULL)
(*sc->power)(sc, why);
- } else if (ifp->if_flags & IFF_UP) {
- if (sc->power !=3D NULL)
- (*sc->power)(sc, why);
- ex_init(ifp);
+ break;
+ case PWR_RESUME:
+ if (ifp->if_flags & IFF_UP) {
+ if (sc->power !=3D NULL)
+ (*sc->power)(sc, why);
+ ex_init(ifp);
+ }
+ break;
+ case PWR_SOFTSUSPEND: =
+ case PWR_SOFTSTANDBY: =
+ case PWR_SOFTRESUME:
+ break;
}
splx(s);
}