summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2014-12-16 16:28:27 +0530
committerStefan Agner <stefan.agner@toradex.com>2014-12-18 17:37:38 +0100
commit068ecdab500e551f313cd6b08dccc32c9d55e137 (patch)
treeda386c84606c84b16d41a4c85334666688a25be6
parentd131b771ee18ebb5330e97e83ba9740d6f421e2b (diff)
u_ether: Fix usb client usage with gadget ethernet
Currently the Vybrid USB client does not work reliably with usb gadget ethernet. This patch forces usage of only a single transfer descriptor for the dTD list which seems to work reliably well for now. Does not fix the underlying issue and is only temporary. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--drivers/usb/gadget/function/u_ether.c5
-rw-r--r--drivers/usb/gadget/function/u_ether.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 6e6f87656e7b..e1a1ea8b41d2 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -85,7 +85,10 @@ struct eth_dev {
#define RX_EXTRA 20 /* bytes guarding against rx overflows */
-#define DEFAULT_QLEN 2 /* double buffering by default */
+/* Default value is 2 for double buffering. Change it to 1 as
+ * as a temporary fix for the USB client issue in Vybrid.
+ */
+#define DEFAULT_QLEN 1 /* double buffering by default */
/* for dual-speed hardware, use deeper queues at high/super speed */
static inline int qlen(struct usb_gadget *gadget, unsigned qmult)
diff --git a/drivers/usb/gadget/function/u_ether.h b/drivers/usb/gadget/function/u_ether.h
index 334b38947916..936e7273efe0 100644
--- a/drivers/usb/gadget/function/u_ether.h
+++ b/drivers/usb/gadget/function/u_ether.h
@@ -22,7 +22,10 @@
#include "gadget_chips.h"
-#define QMULT_DEFAULT 5
+/* Default value is 1. Change it to 1 as a temporary fix for the
+ * USB client issue in Vybrid.
+ */
+#define QMULT_DEFAULT 1
/*
* dev_addr: initial value