qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] USB - question on (usb_uhci) HCRESET


From: Lonnie Mendez
Subject: [Qemu-devel] USB - question on (usb_uhci) HCRESET
Date: Thu, 17 Nov 2005 09:02:06 -0600
User-agent: KMail/1.8.2

   I noticed while testing the uhci emulation on debian it fails to load on the
Linux 2.6.12 kernel:

(from qemu terminal)
uhci writew port=0x0004 val=0x0000
uhci writew port=0x0000 val=0x0004
uhci writew port=0x0000 val=0x0000
uhci readw port=0x0010 val=0x0083
uhci readw port=0x0012 val=0x0080
uhci readw port=0x0014 val=0xff7f
uhci writew port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002
uhci readw port=0x0000 val=0x0002

(from kernel boot sequence)
uhci_hcd 0000:00:01.2: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II]
uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c020
uhci_hcd 0000:00:01.2: USBCMD_HCRESET timed out!
uhci_hcd 0000:00:01.2: startup error -110
uhci_hcd 0000:00:01.2: USB bus 1 deregistered
uhci_hcd 0000:00:01.2: init 0000:00:01.2 fail, -110
uhci_hcd: probe of 0000:00:01.2 failed with error -110

   From this, the uhci driver is looking for the cmd register to be reset on 
HCRESET,
but it never happens.

Looking at the kernel source, it fails in the code starting on line 377:
http://kernel.org/git/?p=linux/kernel/git/gregkh/linux-2.6.12.y.git;a=blob;h=49bd83ee0c75bd77eded16e1fa3d02484f2d784a;hb=ab1e03b731781609a550360f295061ff57ca3dbb;f=drivers/usb/host/uhci-hcd.c

   A quick glance at hw/usb-uhci.c in function uhci_ioport_writew shows two 
checks
for UHCI_CMD_GRESET; both call uhci_reset().  Shouldn't the second selection
logic structure look like:

        if (val & UHCI_CMD_HCRESET) {
            uhci_reset(s);
            return;
        }

   This solves the problem with 2.6.12 and the bus is registered successfuly.
On another note, when you perform 'info usb' from qemu monitor with a
Full Speed device attached it reports 480Mb/s as the device speed.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]