diff options
Diffstat (limited to 'usb/usb-s3c-hsotg-re-initialise-all-fifos-on-usb-bus-reset.patch')
| -rw-r--r-- | usb/usb-s3c-hsotg-re-initialise-all-fifos-on-usb-bus-reset.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/usb/usb-s3c-hsotg-re-initialise-all-fifos-on-usb-bus-reset.patch b/usb/usb-s3c-hsotg-re-initialise-all-fifos-on-usb-bus-reset.patch new file mode 100644 index 00000000000000..46dd1ac9060dd8 --- /dev/null +++ b/usb/usb-s3c-hsotg-re-initialise-all-fifos-on-usb-bus-reset.patch @@ -0,0 +1,44 @@ +From ben@ben-laptop.fluff.org Thu Jul 22 16:49:16 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: Re-initialise all FIFOs on USB bus reset +Date: Mon, 19 Jul 2010 09:40:43 +0100 +Message-Id: <1279528850-28245-5-git-send-email-ben-linux@fluff.org> + +The USB documentation suggest that the FIFOs should be reset when a +bus reset event happens. Use the s3c_hsotg_init_fifo() to ensure that +the FIFO layout is correct and that the FIFOs are flushed before +acknowledging the reset. + +Signed-off-by: Ben Dooks <ben-linux@fluff.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/s3c-hsotg.c | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +--- a/drivers/usb/gadget/s3c-hsotg.c ++++ b/drivers/usb/gadget/s3c-hsotg.c +@@ -2082,17 +2082,12 @@ irq_retry: + kill_all_requests(hsotg, &hsotg->eps[0], -ECONNRESET, true); + + /* it seems after a reset we can end up with a situation +- * where the TXFIFO still has data in it... try flushing +- * it to remove anything that may still be in it. ++ * where the TXFIFO still has data in it... the docs ++ * suggest resetting all the fifos, so use the init_fifo ++ * code to relayout and flush the fifos. + */ + +- if (1) { +- writel(S3C_GRSTCTL_TxFNum(0) | S3C_GRSTCTL_TxFFlsh, +- hsotg->regs + S3C_GRSTCTL); +- +- dev_info(hsotg->dev, "GNPTXSTS=%08x\n", +- readl(hsotg->regs + S3C_GNPTXSTS)); +- } ++ s3c_hsotg_init_fifo(hsotg); + + s3c_hsotg_enqueue_setup(hsotg); + |
