]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.34.4/usb-ehci-remove-pci-assumption.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.34.4 / usb-ehci-remove-pci-assumption.patch
1 From ae68a83bdc1971cb02fefc7a686ba6d077065e71 Mon Sep 17 00:00:00 2001
2 From: Alan Stern <stern@rowland.harvard.edu>
3 Date: Wed, 14 Jul 2010 11:03:23 -0400
4 Subject: USB: EHCI: remove PCI assumption
5
6 From: Alan Stern <stern@rowland.harvard.edu>
7
8 commit ae68a83bdc1971cb02fefc7a686ba6d077065e71 upstream.
9
10 This patch (as1405) fixes a small bug in ehci-hcd's isochronous
11 scheduler. Not all EHCI controllers are PCI, and the code shouldn't
12 assume that they are. Instead, introduce a special flag for
13 controllers which need to delay iso scheduling for full-speed devices
14 beyond the scheduling threshold.
15
16 Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
17 CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
18 CC: David Brownell <david-b@pacbell.net>
19 Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21
22 ---
23 drivers/usb/host/ehci-pci.c | 1 +
24 drivers/usb/host/ehci-sched.c | 10 ++++------
25 drivers/usb/host/ehci.h | 1 +
26 3 files changed, 6 insertions(+), 6 deletions(-)
27
28 --- a/drivers/usb/host/ehci-pci.c
29 +++ b/drivers/usb/host/ehci-pci.c
30 @@ -111,6 +111,7 @@ static int ehci_pci_setup(struct usb_hcd
31 switch (pdev->vendor) {
32 case PCI_VENDOR_ID_INTEL:
33 ehci->need_io_watchdog = 0;
34 + ehci->fs_i_thresh = 1;
35 if (pdev->device == 0x27cc) {
36 ehci->broken_periodic = 1;
37 ehci_info(ehci, "using broken periodic workaround\n");
38 --- a/drivers/usb/host/ehci-sched.c
39 +++ b/drivers/usb/host/ehci-sched.c
40 @@ -1400,7 +1400,6 @@ iso_stream_schedule (
41 int status;
42 unsigned mod = ehci->periodic_size << 3;
43 struct ehci_iso_sched *sched = urb->hcpriv;
44 - struct pci_dev *pdev;
45
46 if (sched->span > (mod - SCHEDULE_SLOP)) {
47 ehci_dbg (ehci, "iso request %p too long\n", urb);
48 @@ -1427,15 +1426,14 @@ iso_stream_schedule (
49 * slot in the schedule, implicitly assuming URB_ISO_ASAP.
50 */
51 if (likely (!list_empty (&stream->td_list))) {
52 - pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
53 start = stream->next_uframe;
54
55 /* For high speed devices, allow scheduling within the
56 - * isochronous scheduling threshold. For full speed devices,
57 - * don't. (Work around for Intel ICH9 bug.)
58 + * isochronous scheduling threshold. For full speed devices
59 + * and Intel PCI-based controllers, don't (work around for
60 + * Intel ICH9 bug).
61 */
62 - if (!stream->highspeed &&
63 - pdev->vendor == PCI_VENDOR_ID_INTEL)
64 + if (!stream->highspeed && ehci->fs_i_thresh)
65 next = now + ehci->i_thresh;
66 else
67 next = now;
68 --- a/drivers/usb/host/ehci.h
69 +++ b/drivers/usb/host/ehci.h
70 @@ -130,6 +130,7 @@ struct ehci_hcd { /* one per controlle
71 unsigned has_amcc_usb23:1;
72 unsigned need_io_watchdog:1;
73 unsigned broken_periodic:1;
74 + unsigned fs_i_thresh:1; /* Intel iso scheduling */
75
76 /* required for usb32 quirk */
77 #define OHCI_CTRL_HCFS (3 << 6)