Commit 8b290385 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: ehci-hcd, scheduler handles TT collisions (3/3)

[USB] ehci-hcd detects microframe transaction scheduling collisions

This detects TT schedule collisions for split periodic transactions
on USB 2.0 hubs, handling both isochronous and interrupt transfers
but not supporting the "wrap around to the next frame" modes for
either transfer type.

The ISO scheduler is modified to use that support for full speed
transfers ... though nothing will yet ask it to do that.

It also tracks schedule depth, to help avoid accepting ISO URBs
which need more time than currently remains unscheduled.
parent 7c96943a
This diff is collapsed.
...@@ -418,6 +418,7 @@ struct ehci_iso_stream { ...@@ -418,6 +418,7 @@ struct ehci_iso_stream {
u32 refcount; u32 refcount;
u8 bEndpointAddress; u8 bEndpointAddress;
u8 highspeed; u8 highspeed;
u16 depth; /* depth in uframes */
struct list_head td_list; /* queued itds/sitds */ struct list_head td_list; /* queued itds/sitds */
struct list_head free_list; /* list of unused itds/sitds */ struct list_head free_list; /* list of unused itds/sitds */
struct usb_device *udev; struct usb_device *udev;
...@@ -426,6 +427,7 @@ struct ehci_iso_stream { ...@@ -426,6 +427,7 @@ struct ehci_iso_stream {
unsigned long start; /* jiffies */ unsigned long start; /* jiffies */
unsigned long rescheduled; unsigned long rescheduled;
int next_uframe; int next_uframe;
u32 splits;
/* the rest is derived from the endpoint descriptor, /* the rest is derived from the endpoint descriptor,
* trusting urb->interval == f(epdesc->bInterval) and * trusting urb->interval == f(epdesc->bInterval) and
...@@ -434,6 +436,7 @@ struct ehci_iso_stream { ...@@ -434,6 +436,7 @@ struct ehci_iso_stream {
u8 interval; u8 interval;
u8 usecs, c_usecs; u8 usecs, c_usecs;
u16 maxp; u16 maxp;
u16 raw_mask;
unsigned bandwidth; unsigned bandwidth;
/* This is used to initialize iTD's hw_bufp fields */ /* This is used to initialize iTD's hw_bufp fields */
...@@ -441,7 +444,8 @@ struct ehci_iso_stream { ...@@ -441,7 +444,8 @@ struct ehci_iso_stream {
u32 buf1; u32 buf1;
u32 buf2; u32 buf2;
/* ... sITD won't use buf[012], and needs TT access ... */ /* this is used to initialize sITD's tt info */
u32 address;
}; };
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment