summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-03-18 11:25:11 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-03-18 11:25:11 +0100
commit72249651843f93d50c302833546fb2880052a80f (patch)
tree172a8af74ce161bc276856d7331dc0076055093c /drivers/usb/host/ehci-hcd.c
parentaef4075a0bcc7860eafa17be0c6e6cfcecc68206 (diff)
parent50c4c848d6b8743894cfcec166db475ef6140504 (diff)
Merge tag '3.0-vybrid-ts2.13' into colibri_vfColibri_VF_LinuxImageV2.1Beta3_20140318
3.0-vybrid-ts2.13
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ffc22bf1d825..c486480ab982 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -48,6 +48,21 @@
#include <asm/system.h>
#include <asm/unaligned.h>
+
+#ifdef CONFIG_FSL_USB_TEST_MODE
+static u32 single_step_desc_data_on;
+void set_single_step_desc_data_on(void)
+{
+ single_step_desc_data_on = 1;
+}
+EXPORT_SYMBOL_GPL(set_single_step_desc_data_on);
+
+void clear_single_step_desc_data_on(void)
+{
+ single_step_desc_data_on = 0;
+}
+EXPORT_SYMBOL_GPL(clear_single_step_desc_data_on);
+#endif
/*-------------------------------------------------------------------------*/
/*
@@ -959,8 +974,22 @@ static int ehci_urb_enqueue (
/* FALLTHROUGH */
/* case PIPE_BULK: */
default:
- if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
+#ifdef CONFIG_FSL_USB_TEST_MODE
+ if (!single_step_desc_data_on) {
+ printk(KERN_DEBUG "in test mode, but single step NOT on\n");
+ if (!qh_urb_transaction(ehci, urb, &qtd_list,
+ mem_flags))
+ return -ENOMEM;
+ } else {
+ printk(KERN_DEBUG "in test mode, single step on\n");
+ if (!single_step_qh_urb_transaction(ehci, urb,
+ &qtd_list, mem_flags))
+ return -ENOMEM;
+ }
+#else
+ if (!qh_urb_transaction(ehci, urb, &qtd_list, mem_flags))
return -ENOMEM;
+#endif
return submit_async(ehci, urb, &qtd_list, mem_flags);
case PIPE_INTERRUPT: