Commit b3864ced authored by Ben Dooks's avatar Ben Dooks Committed by Greg Kroah-Hartman

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: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e7a9ff54
...@@ -2082,17 +2082,12 @@ static irqreturn_t s3c_hsotg_irq(int irq, void *pw) ...@@ -2082,17 +2082,12 @@ static irqreturn_t s3c_hsotg_irq(int irq, void *pw)
kill_all_requests(hsotg, &hsotg->eps[0], -ECONNRESET, true); kill_all_requests(hsotg, &hsotg->eps[0], -ECONNRESET, true);
/* it seems after a reset we can end up with a situation /* it seems after a reset we can end up with a situation
* where the TXFIFO still has data in it... try flushing * where the TXFIFO still has data in it... the docs
* it to remove anything that may still be in it. * suggest resetting all the fifos, so use the init_fifo
* code to relayout and flush the fifos.
*/ */
if (1) { s3c_hsotg_init_fifo(hsotg);
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_enqueue_setup(hsotg); s3c_hsotg_enqueue_setup(hsotg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment