Fwd: core dump on kldload atapicam
Alexander Motin
mav at FreeBSD.org
Thu Sep 24 10:09:22 UTC 2009
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
-------------- next part --------------
--- 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);
/*
More information about the freebsd-current
mailing list