diff options
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index f5f5601701c9..13ead00aecd5 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
36 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
37 | #include <linux/debugfs.h> | 36 | #include <linux/debugfs.h> |
37 | #include <linux/slab.h> | ||
38 | 38 | ||
39 | #include "../core/hcd.h" | 39 | #include "../core/hcd.h" |
40 | 40 | ||
@@ -210,7 +210,7 @@ static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr, | |||
210 | if (error) { | 210 | if (error) { |
211 | ehci_halt(ehci); | 211 | ehci_halt(ehci); |
212 | ehci_to_hcd(ehci)->state = HC_STATE_HALT; | 212 | ehci_to_hcd(ehci)->state = HC_STATE_HALT; |
213 | ehci_err(ehci, "force halt; handhake %p %08x %08x -> %d\n", | 213 | ehci_err(ehci, "force halt; handshake %p %08x %08x -> %d\n", |
214 | ptr, mask, done, error); | 214 | ptr, mask, done, error); |
215 | } | 215 | } |
216 | 216 | ||
@@ -543,13 +543,14 @@ static int ehci_init(struct usb_hcd *hcd) | |||
543 | */ | 543 | */ |
544 | ehci->periodic_size = DEFAULT_I_TDPS; | 544 | ehci->periodic_size = DEFAULT_I_TDPS; |
545 | INIT_LIST_HEAD(&ehci->cached_itd_list); | 545 | INIT_LIST_HEAD(&ehci->cached_itd_list); |
546 | INIT_LIST_HEAD(&ehci->cached_sitd_list); | ||
546 | if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) | 547 | if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) |
547 | return retval; | 548 | return retval; |
548 | 549 | ||
549 | /* controllers may cache some of the periodic schedule ... */ | 550 | /* controllers may cache some of the periodic schedule ... */ |
550 | hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); | 551 | hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); |
551 | if (HCC_ISOC_CACHE(hcc_params)) // full frame cache | 552 | if (HCC_ISOC_CACHE(hcc_params)) // full frame cache |
552 | ehci->i_thresh = 8; | 553 | ehci->i_thresh = 2 + 8; |
553 | else // N microframes cached | 554 | else // N microframes cached |
554 | ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); | 555 | ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); |
555 | 556 | ||
@@ -605,6 +606,8 @@ static int ehci_init(struct usb_hcd *hcd) | |||
605 | } | 606 | } |
606 | ehci->command = temp; | 607 | ehci->command = temp; |
607 | 608 | ||
609 | /* Accept arbitrarily long scatter-gather lists */ | ||
610 | hcd->self.sg_tablesize = ~0; | ||
608 | return 0; | 611 | return 0; |
609 | } | 612 | } |
610 | 613 | ||
@@ -785,9 +788,10 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
785 | 788 | ||
786 | /* start 20 msec resume signaling from this port, | 789 | /* start 20 msec resume signaling from this port, |
787 | * and make khubd collect PORT_STAT_C_SUSPEND to | 790 | * and make khubd collect PORT_STAT_C_SUSPEND to |
788 | * stop that signaling. | 791 | * stop that signaling. Use 5 ms extra for safety, |
792 | * like usb_port_resume() does. | ||
789 | */ | 793 | */ |
790 | ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); | 794 | ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); |
791 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); | 795 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); |
792 | mod_timer(&hcd->rh_timer, ehci->reset_done[i]); | 796 | mod_timer(&hcd->rh_timer, ehci->reset_done[i]); |
793 | } | 797 | } |
@@ -992,7 +996,7 @@ rescan: | |||
992 | /* endpoints can be iso streams. for now, we don't | 996 | /* endpoints can be iso streams. for now, we don't |
993 | * accelerate iso completions ... so spin a while. | 997 | * accelerate iso completions ... so spin a while. |
994 | */ | 998 | */ |
995 | if (qh->hw->hw_info1 == 0) { | 999 | if (qh->hw == NULL) { |
996 | ehci_vdbg (ehci, "iso delay\n"); | 1000 | ehci_vdbg (ehci, "iso delay\n"); |
997 | goto idle_timeout; | 1001 | goto idle_timeout; |
998 | } | 1002 | } |
@@ -1105,11 +1109,21 @@ MODULE_LICENSE ("GPL"); | |||
1105 | #define PLATFORM_DRIVER ehci_fsl_driver | 1109 | #define PLATFORM_DRIVER ehci_fsl_driver |
1106 | #endif | 1110 | #endif |
1107 | 1111 | ||
1112 | #ifdef CONFIG_USB_EHCI_MXC | ||
1113 | #include "ehci-mxc.c" | ||
1114 | #define PLATFORM_DRIVER ehci_mxc_driver | ||
1115 | #endif | ||
1116 | |||
1108 | #ifdef CONFIG_SOC_AU1200 | 1117 | #ifdef CONFIG_SOC_AU1200 |
1109 | #include "ehci-au1xxx.c" | 1118 | #include "ehci-au1xxx.c" |
1110 | #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver | 1119 | #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver |
1111 | #endif | 1120 | #endif |
1112 | 1121 | ||
1122 | #ifdef CONFIG_ARCH_OMAP3 | ||
1123 | #include "ehci-omap.c" | ||
1124 | #define PLATFORM_DRIVER ehci_hcd_omap_driver | ||
1125 | #endif | ||
1126 | |||
1113 | #ifdef CONFIG_PPC_PS3 | 1127 | #ifdef CONFIG_PPC_PS3 |
1114 | #include "ehci-ps3.c" | 1128 | #include "ehci-ps3.c" |
1115 | #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver | 1129 | #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver |
@@ -1120,6 +1134,11 @@ MODULE_LICENSE ("GPL"); | |||
1120 | #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver | 1134 | #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver |
1121 | #endif | 1135 | #endif |
1122 | 1136 | ||
1137 | #ifdef CONFIG_XPS_USB_HCD_XILINX | ||
1138 | #include "ehci-xilinx-of.c" | ||
1139 | #define OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver | ||
1140 | #endif | ||
1141 | |||
1123 | #ifdef CONFIG_PLAT_ORION | 1142 | #ifdef CONFIG_PLAT_ORION |
1124 | #include "ehci-orion.c" | 1143 | #include "ehci-orion.c" |
1125 | #define PLATFORM_DRIVER ehci_orion_driver | 1144 | #define PLATFORM_DRIVER ehci_orion_driver |