From: Lonnie Mendez <lmendez19@austin.rr.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] USB - question on (usb_uhci) HCRESET
Date: Thu, 17 Nov 2005 09:02:06 -0600 [thread overview]
Message-ID: <200511170902.06813.lmendez19@austin.rr.com> (raw)
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 other threads:[~2005-11-17 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511170902.06813.lmendez19@austin.rr.com \
--to=lmendez19@austin.rr.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).