Date: Thu, 24 Sep 2009 12:36:38 +0300 From: Alexander Motin <mav@FreeBSD.org> To: Jaakko Heinonen <jh@saunalahti.fi> Cc: Peter Holm <pho@freebsd.org>, scottl@freebsd.org, Andriy Gapon <avg@freebsd.org>, FreeBSD-Current <freebsd-current@freebsd.org>, Thomas Quinot <thomas@freebsd.org>, Kostik Belousov <kostikbel@gmail.com> Subject: Re: Fwd: core dump on kldload atapicam Message-ID: <4ABB3DA6.5090004@FreeBSD.org> In-Reply-To: <20090924060805.GA2057@a91-153-125-115.elisa-laajakaista.fi> References: <20090923055647.GA2183@a91-153-125-115.elisa-laajakaista.fi> <4ABA5566.8010406@FreeBSD.org> <4ABA5B13.9050208@freebsd.org> <4ABA5C39.7090007@FreeBSD.org> <20090924060805.GA2057@a91-153-125-115.elisa-laajakaista.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------040400020805010509010905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jaakko Heinonen wrote: > On 2009-09-23, Alexander Motin wrote: >> Then please explain me how it happens. I don't think that explanation >> "it just works" sufficient. >> >> Any ideas what needed to reproduce that? Because it looks like not going >> to fall in my case: > > It happens if a parent ata device is not attached. I can reproduce the > problem on system which hash ata0, ata2 and ata3 devices but ata1 fails > to probe. Nice catch. I think it is newbus problem, not ata. I am able to simulate this problem locally and attached patch fixes it. Any objections? -- Alexander Motin --------------040400020805010509010905 Content-Type: text/plain; name="subr_bus.c.newdrv.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="subr_bus.c.newdrv.patch" --- subr_bus.c.prev 2009-09-15 20:44:39.000000000 +0300 +++ subr_bus.c 2009-09-24 12:24:35.000000000 +0300 @@ -1017,7 +1017,7 @@ devclass_driver_added(devclass_t dc, dri * Call BUS_DRIVER_ADDED for any existing busses in this class. */ for (i = 0; i < dc->maxunit; i++) - if (dc->devices[i]) + if (dc->devices[i] && device_is_attached(dc->devices[i])) BUS_DRIVER_ADDED(dc->devices[i], driver); /* --------------040400020805010509010905--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ABB3DA6.5090004>