Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Dec 2001 13:56:06 -0800
From:      Andy Sparrow <spadger@best.com>
To:        Guido van Rooij <guido@gvr.org>
Cc:        wpaul@freebsd.org, freebsd-mobile@FreeBSD.ORG
Subject:   Re: pccard kernel config for OmniBook 500 
Message-ID:  <20011204215606.2C8DD3E25@CRWdog.demon.co.uk>
In-Reply-To: Message from Guido van Rooij <guido@gvr.org>  of "Wed, 28 Nov 2001 09:47:33 %2B0100." <20011128094733.B23373@gvr.gvr.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
--==_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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011204215606.2C8DD3E25>