diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-07-14 11:03:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:40 -0400 |
commit | ae68a83bdc1971cb02fefc7a686ba6d077065e71 (patch) | |
tree | e69a504dcc97339afe531db8ec9e36b80fd37d30 /drivers/usb/host | |
parent | 43b86af83da7db8b2c6d85ca970203950e5bad88 (diff) |
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 1 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f555e4f35a04..58b72d741d93 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -114,6 +114,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
114 | break; | 114 | break; |
115 | case PCI_VENDOR_ID_INTEL: | 115 | case PCI_VENDOR_ID_INTEL: |
116 | ehci->need_io_watchdog = 0; | 116 | ehci->need_io_watchdog = 0; |
117 | ehci->fs_i_thresh = 1; | ||
117 | if (pdev->device == 0x27cc) { | 118 | if (pdev->device == 0x27cc) { |
118 | ehci->broken_periodic = 1; | 119 | ehci->broken_periodic = 1; |
119 | ehci_info(ehci, "using broken periodic workaround\n"); | 120 | ehci_info(ehci, "using broken periodic workaround\n"); |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index d640346f9b56..efadced4ae67 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1399,7 +1399,6 @@ iso_stream_schedule ( | |||
1399 | int status; | 1399 | int status; |
1400 | unsigned mod = ehci->periodic_size << 3; | 1400 | unsigned mod = ehci->periodic_size << 3; |
1401 | struct ehci_iso_sched *sched = urb->hcpriv; | 1401 | struct ehci_iso_sched *sched = urb->hcpriv; |
1402 | struct pci_dev *pdev; | ||
1403 | 1402 | ||
1404 | if (sched->span > (mod - SCHEDULE_SLOP)) { | 1403 | if (sched->span > (mod - SCHEDULE_SLOP)) { |
1405 | ehci_dbg (ehci, "iso request %p too long\n", urb); | 1404 | ehci_dbg (ehci, "iso request %p too long\n", urb); |
@@ -1426,15 +1425,14 @@ iso_stream_schedule ( | |||
1426 | * slot in the schedule, implicitly assuming URB_ISO_ASAP. | 1425 | * slot in the schedule, implicitly assuming URB_ISO_ASAP. |
1427 | */ | 1426 | */ |
1428 | if (likely (!list_empty (&stream->td_list))) { | 1427 | if (likely (!list_empty (&stream->td_list))) { |
1429 | pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller); | ||
1430 | start = stream->next_uframe; | 1428 | start = stream->next_uframe; |
1431 | 1429 | ||
1432 | /* For high speed devices, allow scheduling within the | 1430 | /* For high speed devices, allow scheduling within the |
1433 | * isochronous scheduling threshold. For full speed devices, | 1431 | * isochronous scheduling threshold. For full speed devices |
1434 | * don't. (Work around for Intel ICH9 bug.) | 1432 | * and Intel PCI-based controllers, don't (work around for |
1433 | * Intel ICH9 bug). | ||
1435 | */ | 1434 | */ |
1436 | if (!stream->highspeed && | 1435 | if (!stream->highspeed && ehci->fs_i_thresh) |
1437 | pdev->vendor == PCI_VENDOR_ID_INTEL) | ||
1438 | next = now + ehci->i_thresh; | 1436 | next = now + ehci->i_thresh; |
1439 | else | 1437 | else |
1440 | next = now; | 1438 | next = now; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index a4a63ce290e9..2c050efd1deb 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -130,6 +130,7 @@ struct ehci_hcd { /* one per controller */ | |||
130 | unsigned has_amcc_usb23:1; | 130 | unsigned has_amcc_usb23:1; |
131 | unsigned need_io_watchdog:1; | 131 | unsigned need_io_watchdog:1; |
132 | unsigned broken_periodic:1; | 132 | unsigned broken_periodic:1; |
133 | unsigned fs_i_thresh:1; /* Intel iso scheduling */ | ||
133 | 134 | ||
134 | /* required for usb32 quirk */ | 135 | /* required for usb32 quirk */ |
135 | #define OHCI_CTRL_HCFS (3 << 6) | 136 | #define OHCI_CTRL_HCFS (3 << 6) |