Patchwork [U-Boot] usbtty: adapt buffers for large packet support

login
register
mail settings
Submitter Vipin Kumar
Date Dec. 17, 2012, 8:49 a.m.
Message ID <b286f0ba3be3da0c97326bba588a35cc9c7d29b0.1355734167.git.vipin.kumar@st.com>
Download mbox | patch
Permalink /patch/206799/
State Accepted
Delegated to: Marek Vasut
Headers show

Comments

Vipin Kumar - Dec. 17, 2012, 8:49 a.m.
From: Shiraz Hashim <shiraz.hashim@st.com>

Increase buffer sizes at driver and tty level to accommodate kermit
large packet support.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
---
 drivers/serial/usbtty.c | 2 +-
 include/usbdevice.h     | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Marek Vasut - Dec. 18, 2012, 6:29 p.m.
Dear Vipin Kumar,

> From: Shiraz Hashim <shiraz.hashim@st.com>
> 
> Increase buffer sizes at driver and tty level to accommodate kermit
> large packet support.
> 
> Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>

Applied, thanks.

Best regards,
Marek Vasut

Patch

diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index e47cb9a..148d1a6 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -63,7 +63,7 @@ 
 /*
  * Buffers to hold input and output data
  */
-#define USBTTY_BUFFER_SIZE 256
+#define USBTTY_BUFFER_SIZE 2048
 static circbuf_t usbtty_input;
 static circbuf_t usbtty_output;
 
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 3edaf8b..7037efd 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -475,7 +475,9 @@  typedef struct urb_link {
  * function driver to inform it that data has arrived.
  */
 
-#define URB_BUF_SIZE 128 /* in linux we'd malloc this, but in u-boot we prefer static data */
+/* in linux we'd malloc this, but in u-boot we prefer static data */
+#define URB_BUF_SIZE 512
+
 struct urb {
 
 	struct usb_endpoint_instance *endpoint;