Date: Tue, 29 Aug 2006 18:04:03 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org Cc: David Christensen <davidch@broadcom.com>, Sam Eaton <sam@fqdn.net> Subject: Re: [sam@fqdn.net: bce0 watchdog timeout errors] Message-ID: <200608291804.03848.jhb@freebsd.org> In-Reply-To: <09BFF2FA5EAB4A45B6655E151BBDD90301E2EF85@NT-IRVA-0750.brcm.ad.broadcom.com> References: <09BFF2FA5EAB4A45B6655E151BBDD90301E2EF85@NT-IRVA-0750.brcm.ad.broadcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 29 August 2006 17:33, David Christensen wrote:
> > I see looking through the archives that Julian Elischer has reported
> > something *vaguely* similar to my problems described in the attached
> > message to this list, so I thought I'd join in.
> >
> > Julian reports a problem when the bce interface is
> > disconnected and then
> > reconnected under load, and never comes back until all load
> > is removed,
> > while reporting watchdog timeout errors.
> >
> > I see something rather like this (details in the attached message
> > (hopefully the attachment will survive :))), but without physically
> > disconnecting the cable.
> >
> > I am wondering if I'm actually seeing the same problem, but
> > that rather
> > than the cable being unplugged, it's something like the interface
> > resetting on our (old, 100Mb/s) switch resetting and triggering this.
> >
> > Thought it was worth offering another data point. I'm
> > running the most
> > recent version of the bce driver with the changes to fix the 'mbuf'
> > errors.
> >
>
> A change was recently added to bge (r1.140) to address some issues
> with locking in the driver when performing PHY accesses which was
> also causing watchdog timeout errors. I need to look at those
> changes and see if they are applicable to the bce driver as well,
> though I've been having problems loading both bge and bce as
> modules on -CURRENT (causes a panic). If I can get past the module
> problem I'll look at the bge change soon.
bce_ifmedia_sts() has locking, but bce_ifmedia_upd() is missing locking.
Something like this would do it:
Index: if_bce.c
===================================================================
RCS file: /host/cvs/usr/cvs/src/sys/dev/bce/if_bce.c,v
retrieving revision 1.7
diff -u -r1.7 if_bce.c
--- if_bce.c 15 Aug 2006 04:56:29 -0000 1.7
+++ if_bce.c 29 Aug 2006 22:03:17 -0000
@@ -3933,15 +3933,17 @@
/* DRC - ToDo: Add SerDes support. */
+ BCE_LOCK(sc);
mii = device_get_softc(sc->bce_miibus);
sc->bce_link = 0;
if (mii->mii_instance) {
struct mii_softc *miisc;
- for (miisc = LIST_FIRST(&mii->mii_phys); miisc != NULL;
- miisc = LIST_NEXT(miisc, mii_list))
+
+ LIST_FOREACH(miisc, &mii->mii_physm, mii_list)
mii_phy_reset(miisc);
}
mii_mediachg(mii);
+ BCE_UNLOCK(sc);
return(rc);
}
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608291804.03848.jhb>
