USB: EHCI: remove PCI assumption
This patch (as1405) fixes a small bug in ehci-hcd's isochronous scheduler. Not all EHCI controllers are PCI, and the code shouldn't assume that they are. Instead, introduce a special flag for controllers which need to delay iso scheduling for full-speed devices beyond the scheduling threshold. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> CC: David Brownell <david-b@pacbell.net> CC: stable <stable@kernel.org> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
parent
43b86af83d
commit
ae68a83bdc
3 changed files with 6 additions and 6 deletions
|
@ -114,6 +114,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
||||||
break;
|
break;
|
||||||
case PCI_VENDOR_ID_INTEL:
|
case PCI_VENDOR_ID_INTEL:
|
||||||
ehci->need_io_watchdog = 0;
|
ehci->need_io_watchdog = 0;
|
||||||
|
ehci->fs_i_thresh = 1;
|
||||||
if (pdev->device == 0x27cc) {
|
if (pdev->device == 0x27cc) {
|
||||||
ehci->broken_periodic = 1;
|
ehci->broken_periodic = 1;
|
||||||
ehci_info(ehci, "using broken periodic workaround\n");
|
ehci_info(ehci, "using broken periodic workaround\n");
|
||||||
|
|
|
@ -1399,7 +1399,6 @@ iso_stream_schedule (
|
||||||
int status;
|
int status;
|
||||||
unsigned mod = ehci->periodic_size << 3;
|
unsigned mod = ehci->periodic_size << 3;
|
||||||
struct ehci_iso_sched *sched = urb->hcpriv;
|
struct ehci_iso_sched *sched = urb->hcpriv;
|
||||||
struct pci_dev *pdev;
|
|
||||||
|
|
||||||
if (sched->span > (mod - SCHEDULE_SLOP)) {
|
if (sched->span > (mod - SCHEDULE_SLOP)) {
|
||||||
ehci_dbg (ehci, "iso request %p too long\n", urb);
|
ehci_dbg (ehci, "iso request %p too long\n", urb);
|
||||||
|
@ -1426,15 +1425,14 @@ iso_stream_schedule (
|
||||||
* slot in the schedule, implicitly assuming URB_ISO_ASAP.
|
* slot in the schedule, implicitly assuming URB_ISO_ASAP.
|
||||||
*/
|
*/
|
||||||
if (likely (!list_empty (&stream->td_list))) {
|
if (likely (!list_empty (&stream->td_list))) {
|
||||||
pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
|
|
||||||
start = stream->next_uframe;
|
start = stream->next_uframe;
|
||||||
|
|
||||||
/* For high speed devices, allow scheduling within the
|
/* For high speed devices, allow scheduling within the
|
||||||
* isochronous scheduling threshold. For full speed devices,
|
* isochronous scheduling threshold. For full speed devices
|
||||||
* don't. (Work around for Intel ICH9 bug.)
|
* and Intel PCI-based controllers, don't (work around for
|
||||||
|
* Intel ICH9 bug).
|
||||||
*/
|
*/
|
||||||
if (!stream->highspeed &&
|
if (!stream->highspeed && ehci->fs_i_thresh)
|
||||||
pdev->vendor == PCI_VENDOR_ID_INTEL)
|
|
||||||
next = now + ehci->i_thresh;
|
next = now + ehci->i_thresh;
|
||||||
else
|
else
|
||||||
next = now;
|
next = now;
|
||||||
|
|
|
@ -130,6 +130,7 @@ struct ehci_hcd { /* one per controller */
|
||||||
unsigned has_amcc_usb23:1;
|
unsigned has_amcc_usb23:1;
|
||||||
unsigned need_io_watchdog:1;
|
unsigned need_io_watchdog:1;
|
||||||
unsigned broken_periodic:1;
|
unsigned broken_periodic:1;
|
||||||
|
unsigned fs_i_thresh:1; /* Intel iso scheduling */
|
||||||
|
|
||||||
/* required for usb32 quirk */
|
/* required for usb32 quirk */
|
||||||
#define OHCI_CTRL_HCFS (3 << 6)
|
#define OHCI_CTRL_HCFS (3 << 6)
|
||||||
|
|
Loading…
Add table
Reference in a new issue