From owner-freebsd-arch@FreeBSD.ORG Fri Jan 27 14:16:01 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03C6C1065672 for ; Fri, 27 Jan 2012 14:16:01 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9508FC08 for ; Fri, 27 Jan 2012 14:16:00 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q0REFuYg032439; Fri, 27 Jan 2012 15:15:56 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q0REFuH4032438; Fri, 27 Jan 2012 15:15:56 +0100 (CET) (envelope-from marius) Date: Fri, 27 Jan 2012 15:15:56 +0100 From: Marius Strobl To: Hans Petter Selasky Message-ID: <20120127141556.GU44286@alchemy.franken.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201201261725.02980.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Cc: Stefan Bethke , freebsd-arch@freebsd.org Subject: Re: Extending sys/dev/mii X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 14:16:01 -0000 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