diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-07-19 04:40:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:42 -0400 |
commit | b3864cedfb576e11d2f9274f14a24840d8b569c3 (patch) | |
tree | 0aa873cdb6c3a87ea33b20feb3598628ef3fe2cf /drivers/usb | |
parent | e7a9ff54271bf0ddbf641e5a0bde3ebda35808be (diff) |
USB: s3c-hsotg: Re-initialise all FIFOs on USB bus reset
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 354fd456f8cc..9d32c9ff737d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -2082,17 +2082,12 @@ irq_retry: | |||
2082 | kill_all_requests(hsotg, &hsotg->eps[0], -ECONNRESET, true); | 2082 | kill_all_requests(hsotg, &hsotg->eps[0], -ECONNRESET, true); |
2083 | 2083 | ||
2084 | /* it seems after a reset we can end up with a situation | 2084 | /* it seems after a reset we can end up with a situation |
2085 | * where the TXFIFO still has data in it... try flushing | 2085 | * where the TXFIFO still has data in it... the docs |
2086 | * it to remove anything that may still be in it. | 2086 | * suggest resetting all the fifos, so use the init_fifo |
2087 | * code to relayout and flush the fifos. | ||
2087 | */ | 2088 | */ |
2088 | 2089 | ||
2089 | if (1) { | 2090 | s3c_hsotg_init_fifo(hsotg); |
2090 | writel(S3C_GRSTCTL_TxFNum(0) | S3C_GRSTCTL_TxFFlsh, | ||
2091 | hsotg->regs + S3C_GRSTCTL); | ||
2092 | |||
2093 | dev_info(hsotg->dev, "GNPTXSTS=%08x\n", | ||
2094 | readl(hsotg->regs + S3C_GNPTXSTS)); | ||
2095 | } | ||
2096 | 2091 | ||
2097 | s3c_hsotg_enqueue_setup(hsotg); | 2092 | s3c_hsotg_enqueue_setup(hsotg); |
2098 | 2093 | ||