Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic: config_attach: duplicate uhub3



On Sun, Nov 29, 2009 at 02:46:12PM +0100, Jarle Greipsland wrote:
> Some console output (10-finger copy):
> 
> ehci0 at pci0 dev 26 function 7: vendor 0x8086 product 0x293c (rev. 0x03)
> ehci0: interrupting at ioapic0 pin 23
> ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
> usb3 at ehci0: USB revision 2.0
> [ ... ]
> uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub3 at usb3: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
> panic: config_attach: duplicate uhub3
> 
> How can I help fix this problem?

Apply this patch to sys/kern/subr_autoconf.c and send the output.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933
Index: subr_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/kern/subr_autoconf.c,v
retrieving revision 1.189
diff -p -u -u -p -r1.189 subr_autoconf.c
--- subr_autoconf.c     29 Nov 2009 15:17:30 -0000      1.189
+++ subr_autoconf.c     3 Dec 2009 22:08:23 -0000
@@ -988,14 +988,19 @@ out:
 static void
 config_devlink(device_t dev)
 {
-       struct cfdriver *cd = dev->dv_cfdriver;
+       device_t dup;
+       cfdriver_t cd = device_cfdriver(dev);
        int s;
 
        /* put this device in the devices array */
        s = config_alldevs_lock();
        config_makeroom(dev->dv_unit, cd);
-       if (cd->cd_devs[dev->dv_unit])
-               panic("config_attach: duplicate %s", device_xname(dev));
+       if ((dup = cd->cd_devs[dev->dv_unit]) != NULL) {
+               panic("%s: duplicate %s (%p) of %p, %d write, %d read, "
+                     "%sgarbage", __func__, device_xname(dev),
+                     (void *)dev, (void *)dup, alldevs_nwrite, alldevs_nread,
+                     alldevs_garbage ? "" : "no ");
+       }
        cd->cd_devs[dev->dv_unit] = dev;
 
        /* It is safe to add a device to the tail of the list while


Home | Main Index | Thread Index | Old Index