aboutsummaryrefslogtreecommitdiffstats
path: root/usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 16:57:38 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 16:57:38 -0700
commit6bbbb136e761db39158852c9b42619c2438e9d45 (patch)
tree4b48eba7be3ba0e7ffbddc0fee4988d26623099a /usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch
parent5caca10b163e38f1671c4be83c480581da4d90d6 (diff)
downloadpatches-6bbbb136e761db39158852c9b42619c2438e9d45.tar.gz
lots of patches
Diffstat (limited to 'usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch')
-rw-r--r--usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch b/usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch
new file mode 100644
index 00000000000000..3858476cc2c4fd
--- /dev/null
+++ b/usb/usb-s3c-hsotg-increase-tx-fifo-limit.patch
@@ -0,0 +1,45 @@
+From ben@ben-laptop.fluff.org Thu Jul 22 16:48:45 2010
+From: Ben Dooks <ben-linux@fluff.org>
+To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org
+Cc: gregkh@suse.de, Ben Dooks <ben-linux@fluff.org>
+Subject: USB: s3c-hsotg: Increase TX fifo limit
+Date: Mon, 19 Jul 2010 09:40:40 +0100
+Message-Id: <1279528850-28245-2-git-send-email-ben-linux@fluff.org>
+
+Up the FIFO size for the TX to 1024 entries, as this now seems to work
+with all the cores. This fixes a problem when using large packets on
+a core with MPS set to 512 can hang due to insufficient space for the
+writes.
+
+The hang arises due to getting the non-periodic FIFO empty IRQ but
+not being able to satisfy any requests since there is never enough
+space to write 512 bytes into the buffer. This means we end up with
+a stream of interrupt requests.
+
+It is easier to up the TX FIFO to fill the space we left for it
+than to try and fix the positions in the code where we should have
+limited the max-packet size to < TXFIFOSIZE, since the TXFIFOSIZE
+depends on how the TX FIFOs have been setup.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/gadget/s3c-hsotg.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/s3c-hsotg.c
++++ b/drivers/usb/gadget/s3c-hsotg.c
+@@ -310,11 +310,11 @@ static void s3c_hsotg_init_fifo(struct s
+ hsotg->regs + S3C_GNPTXFSIZ);
+ */
+
+- /* set FIFO sizes to 2048/0x1C0 */
++ /* set FIFO sizes to 2048/1024 */
+
+ writel(2048, hsotg->regs + S3C_GRXFSIZ);
+ writel(S3C_GNPTXFSIZ_NPTxFStAddr(2048) |
+- S3C_GNPTXFSIZ_NPTxFDep(0x1C0),
++ S3C_GNPTXFSIZ_NPTxFDep(1024),
+ hsotg->regs + S3C_GNPTXFSIZ);
+
+ /* arange all the rest of the TX FIFOs, as some versions of this