Patchwork Re: [PATCH] ehci: check controller state when setting list registers

login
register
mail settings
Submitter David S. Ahern
Date July 10, 2010, 3:45 p.m.
Message ID <4C3895AC.1090204@cisco.com>
Download mbox | patch
Permalink /patch/58488/
State New
Headers show

Comments

David S. Ahern - July 10, 2010, 3:45 p.m.
On 07/10/10 00:02, Jan Kiszka wrote:
> They improve disk pass-through for me as well. I'm now also able to boot
> from some external USB disk. However, applying more heavy load, the disk
> stops working at some point and even disconnects after a while.

I saw that as well. On the TO-DO list.

> The changes also modified the errors disk emulation give. I can attach
> and write to such images now, but reading back seems to return different
> data.

One change msd needs is the ep_wMaxPacketSize. Also I cannot get msd to
work with linux guests with either uhci or ehci. Some debugging is
needed. e.g., impacts of the hack comments usb-msd.c (case insensitive
search)?

Patch

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 09a6a33..87c306e 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -124,7 +124,7 @@  static const uint8_t qemu_msd_config_descriptor[] = {
        0x05,       /*  u8  ep_bDescriptorType; Endpoint */
        0x81,       /*  u8  ep_bEndpointAddress; IN Endpoint 1 */
        0x02,       /*  u8  ep_bmAttributes; Bulk */
-       0x40, 0x00, /*  u16 ep_wMaxPacketSize; */
+       0x00, 0x02, /*  u16 ep_wMaxPacketSize; */
        0x00,       /*  u8  ep_bInterval; */

        /* Bulk-Out endpoint */
@@ -132,7 +132,7 @@  static const uint8_t qemu_msd_config_descriptor[] = {
        0x05,       /*  u8  ep_bDescriptorType; Endpoint */
        0x02,       /*  u8  ep_bEndpointAddress; OUT Endpoint 2 */
        0x02,       /*  u8  ep_bmAttributes; Bulk */
-       0x40, 0x00, /*  u16 ep_wMaxPacketSize; */
+       0x00, 0x02, /*  u16 ep_wMaxPacketSize; */
        0x00        /*  u8  ep_bInterval; */
 };