From owner-freebsd-mobile Tue Dec 4 13:57:14 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from CRWdog.demon.co.uk (client-170-070.neoforma.com [12.44.170.70]) by hub.freebsd.org (Postfix) with ESMTP id 27FB437B68E; Tue, 4 Dec 2001 13:56:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by CRWdog.demon.co.uk (Postfix) with ESMTP id 2C8DD3E25; Tue, 4 Dec 2001 13:56:06 -0800 (PST) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Guido van Rooij Cc: wpaul@freebsd.org, freebsd-mobile@FreeBSD.ORG Subject: Re: pccard kernel config for OmniBook 500 In-Reply-To: Message from Guido van Rooij of "Wed, 28 Nov 2001 09:47:33 +0100." <20011128094733.B23373@gvr.gvr.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_-1180855978P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 04 Dec 2001 13:56:06 -0800 From: Andy Sparrow Message-Id: <20011204215606.2C8DD3E25@CRWdog.demon.co.uk> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --==_Exmh_-1180855978P Content-Type: text/plain; charset=us-ascii Guido, Whilst suspending & resuming repeatedly to test the Maestro3 suspend/resume patch, I noted that I didn't observe a single hesitation or 'xl0 watchdog reset' message with your patch applied (which I had applied at the same time). It now seems to work perfectly from a suspend/resume, I'm very happy. It almost seems churlish to mention that there's a declaration missing in xl_suspend() in the patch which prevents it compiling :-) Can we get a PR for this and get it commited? Thanks again. Cheers, AS > On Tue, Nov 27, 2001 at 12:06:13PM -0800, Andy Sparrow wrote: > > Hmmm. On my 6000, sometimes the xl0 doesn't come back, and I need to suspend & > > resume again to get a link light. > > > > Quite often, it won't respond post-resume until I get an 'xl0: watchdog > > timeout' message, and then the driver re-sets and it's fine. The link light > > seems to be the clue here, although I'm sure I've seen it recover from "no > > link light" after a driver reset too... :) > > > > Infrequently, I need to reboot to get the NIC into a sane state (although > > sound causes me to do this more often than the NIC). > > > > Fairly often under heavy (network) load, the xl0 will get watchdog timeouts. > > Other than that, it seems to work OK. The 'fxp0' in the 6100 works like a > > champ, however... > > > > W.r.t suspend/resume probs: try the attached patch which is currently > under review. > > -Guido > > Index: if_xl.c > =================================================================== > RCS file: /scratch/cvsup/freebsd/CVS/src/sys/pci/if_xl.c,v > retrieving revision 1.72.2.8 > diff -u -r1.72.2.8 if_xl.c > --- if_xl.c 2001/10/27 03:31:34 1.72.2.8 > +++ if_xl.c 2001/11/27 15:42:46 > @@ -220,6 +220,8 @@ > static void xl_stop __P((struct xl_softc *)); > static void xl_watchdog __P((struct ifnet *)); > static void xl_shutdown __P((device_t)); > +static int xl_suspend __P((device_t)); > +static int xl_resume __P((device_t)); > static int xl_ifmedia_upd __P((struct ifnet *)); > static void xl_ifmedia_sts __P((struct ifnet *, struct ifmediareq *)); > > @@ -266,6 +268,8 @@ > DEVMETHOD(device_attach, xl_attach), > DEVMETHOD(device_detach, xl_detach), > DEVMETHOD(device_shutdown, xl_shutdown), > + DEVMETHOD(device_suspend, xl_suspend), > + DEVMETHOD(device_resume, xl_resume), > > /* bus interface */ > DEVMETHOD(bus_print_child, bus_generic_print_child), > @@ -2516,6 +2520,7 @@ > printf("xl%d: initialization failed: no " > "memory for rx buffers\n", sc->xl_unit); > xl_stop(sc); > + splx(s); > return; > } > > @@ -2961,4 +2966,37 @@ > xl_stop(sc); > > return; > +} > + > +static int xl_suspend(dev) > + device_t dev; > +{ > + struct xl_softc *sc; > + > + sc = device_get_softc(dev); > + > + s = splimp(); > + xl_stop(sc); > + splx(s); > + > + return(0); > +} > + > +static int xl_resume(dev) > + device_t dev; > +{ > + struct xl_softc *sc; > + struct ifnet *ifp; > + int s; > + > + s = splimp(); > + sc = device_get_softc(dev); > + ifp = &sc->arpcom.ac_if; > + > + xl_reset(sc); > + if (ifp->if_flags & IFF_UP) > + xl_init(sc); > + > + splx(s); > + return(0); > } > --==_Exmh_-1180855978P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Exmh version 2.5 07/13/2001 iD8DBQE8DUZ2PHh895bDXeQRAqVbAJ9N5noZ3JmbGuw7yaJ6e8B0lx5C9QCfQ1oE zUhmgiDySdQBZTY/R15386I= =uPln -----END PGP SIGNATURE----- --==_Exmh_-1180855978P-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message