DragonFly BSD
DragonFly bugs List (threaded) for 2011-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[no subject]



uhci0@pci0:0:26:0:      class=0x0c0300 card=0x304817aa chip=0x3a678086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'USB UHCI Controller'
    class      = serial bus
    subclass   = USB
uhci1@pci0:0:26:1:      class=0x0c0300 card=0x304817aa chip=0x3a688086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'USB UHCI Controller'
    class      = serial bus
    subclass   = USB

################

I put kprintf's in various kernel source files to find where it hangs. 
(Please note that I do not know anything about the kernel and very little about C).
This is what I found:

Function "uhci_pci_attach(device_t self)" is called from /usr/src/sys/bus/usb/uhci_pci.c

uhci_pci_attach() calls "err = uhci_init(sc);" which is in /usr/src/sys/bus/usb/uhci.c

uhci_init() calls "uhci_globalreset(sc);" which is in /usr/src/sys/bus/usb/uhci.c

uhci_globalreset() calls "usb_delay_ms(&sc->sc_bus, USB_BUS_RESET_DELAY);" which is in /usr/src/sys/bus/usb/usb_subr.c

usb_delay_ms calls "delay((ms+1) * 1000);" with value 101000 (ms is 100).

. ..
. ..

It appears that "delay((ms+1) * 1000);" never returns. I think this because I have a kprintf() after the delay().

delay() is defined as DELAY in /usr/src/sys/bus/usb/usb_subr.c.
DELAY is defined in sys/systm.h but I cannot find the source file containing the DELAY function.

################

/usr/src/sys/bus/usb/usb_subr.c with the extra kprintfs:

/* Delay for a certain number of ms */
void
usb_delay_ms(usbd_bus_handle bus, u_int ms)
{
        kprintf("AK: at start of function usb_delay_ms\n");

        /* Wait at least two clock ticks so we know the time has passed. */
        if (bus->use_polling || cold) {
                kprintf("AK: usb_delay_ms: in if cold and calling delay.\nAK: Value of ms after math: %d\n", (ms+1)*1000);
                delay((ms+1) * 1000);
                kprintf("AK: usb_delay_ms: finished delay\n");
        }
        else {
                kprintf("AK: usb_delay_ms: in else about about to do tsleep\n");
                tsleep(&ms, 0, "usbdly", (ms*hz+999)/1000 + 1);
        }

        kprintf("AK: at end of usb_delay_ms\n");
}

################

Attached dmesg and messages files taken after verbose boot without the usb stick attached.



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



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