Hi,
Current usbback fails to submit the interrupt urb for high-speed
endpoints. This patch fixes this issue.
usb_fill_int_urb() is a helper function to initialize a interrupt urb,
and sets the usb->interval value as follows,
void usb_fill_int_urb(struct urb *urb, ..., int interval)
{
...
if (dev->speed == USB_SPEED_HIGH)
urb->interval = 1 << (interval - 1);
else
urb->interval = interval;
...
}
The interval value that usbback got from the RING_REQ is already
modified to an exponent of two.
So, usbback must not initialize a interrupt urb with double-modified
interval value.
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>
diff --git a/drivers/xen/usbback/usbback.c b/drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c
+++ b/drivers/xen/usbback/usbback.c
@@ -470,6 +470,18 @@ static void usbbk_init_urb(usbif_request
pending_req->buffer, req->buffer_length,
usbbk_urb_complete,
pending_req, req->u.intr.interval);
+ /*
+ * high speed interrupt endpoints use a logarithmic encoding of
+ * the endpoint interval, and usb_fill_int_urb() initializes a
+ * interrupt urb with the encoded interval value.
+ *
+ * req->u.intr.interval is the interval value that already
+ * encoded in the frontend part, and the above
usb_fill_int_urb()
+ * initializes the urb->interval with double encoded value.
+ *
+ * so, simply overwrite the urb->interval with original value.
+ */
+ urb->interval = req->u.intr.interval;
urb->transfer_flags = req->transfer_flags;
break;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|