Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2012 15:15:56 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Stefan Bethke <stb@lassitu.de>, freebsd-arch@freebsd.org
Subject:   Re: Extending sys/dev/mii
Message-ID:  <20120127141556.GU44286@alchemy.franken.de>
In-Reply-To: <201201261725.02980.hselasky@c2i.net>
References:  <47ABA638-7E08-4350-A03C-3D4A23BF2D7E@lassitu.de> <20120125221753.GA17821@alchemy.franken.de> <9E6A719D-A616-4D1E-9DD2-BAA399FFD3AC@lassitu.de> <201201261725.02980.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 26, 2012 at 05:25:02PM +0100, Hans Petter Selasky wrote:
> On Thursday 26 January 2012 17:25:09 Stefan Bethke wrote:
> > Am 25.01.2012 um 23:17 schrieb Marius Strobl:
> > > On Sat, Jan 21, 2012 at 12:08:34AM +0100, Stefan Bethke wrote:
> > >> - miibus has a funny way of attaching to it's parent.  Making the parent
> > >> a bus that automatically attaches matching children does not lead to
> > >> good results.
> > > 
> > > That's the idea behind auto-probing, which all FreeBSD bus drivers
> > > implement as far as the physical bus supports it.
> > 
> > Sorry, I should have been more specific.  I had problems when the device
> > that miibus attaches to implements autoprobing and auto-attaches miibus
> > directly, instead of through mii_attach().
> > 
> 
> Hi,
> 
> While staying at the topic. All unneccesary panic() statements should be 
> removed from mii() drivers. Sometimes, when you unplug a USB network device, a 
> mii read can fail and that should not crash the system!
> 

Uhm, there's a single KASSERT() in mii_phy_setmedia() that you also
can only hit when actually trying to set invalid media but otherwise
there's no call to panic() in sys/dev/mii/*. If you are seeing panics
due to MII access failing these must be triggered by upper layers.

Marius




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