diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-14 17:17:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-14 17:18:05 -0400 |
commit | 869e9e567fe6bba859e1d761250d160a9216498a (patch) | |
tree | f5457728cf9e02edc150fdf032c7cb4387ef25e3 | |
parent | 2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff) | |
parent | 4858f06e7d92ed2ebdb29ccbc079c127e675a89c (diff) |
Merge branch 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus
* 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb:
usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO
usb: musb: host: compare status for negative error values
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 6 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 0a50a35e1853..6aeb363e63e7 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1524,6 +1524,12 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep) | |||
1524 | csr = musb_readw(epio, MUSB_TXCSR); | 1524 | csr = musb_readw(epio, MUSB_TXCSR); |
1525 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) { | 1525 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) { |
1526 | csr |= MUSB_TXCSR_FLUSHFIFO | MUSB_TXCSR_P_WZC_BITS; | 1526 | csr |= MUSB_TXCSR_FLUSHFIFO | MUSB_TXCSR_P_WZC_BITS; |
1527 | /* | ||
1528 | * Setting both TXPKTRDY and FLUSHFIFO makes controller | ||
1529 | * to interrupt current FIFO loading, but not flushing | ||
1530 | * the already loaded ones. | ||
1531 | */ | ||
1532 | csr &= ~MUSB_TXCSR_TXPKTRDY; | ||
1527 | musb_writew(epio, MUSB_TXCSR, csr); | 1533 | musb_writew(epio, MUSB_TXCSR, csr); |
1528 | /* REVISIT may be inappropriate w/o FIFONOTEMPTY ... */ | 1534 | /* REVISIT may be inappropriate w/o FIFONOTEMPTY ... */ |
1529 | musb_writew(epio, MUSB_TXCSR, csr); | 1535 | musb_writew(epio, MUSB_TXCSR, csr); |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 7295e316bdfc..8b2473fa0f47 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -1575,7 +1575,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1575 | /* even if there was an error, we did the dma | 1575 | /* even if there was an error, we did the dma |
1576 | * for iso_frame_desc->length | 1576 | * for iso_frame_desc->length |
1577 | */ | 1577 | */ |
1578 | if (d->status != EILSEQ && d->status != -EOVERFLOW) | 1578 | if (d->status != -EILSEQ && d->status != -EOVERFLOW) |
1579 | d->status = 0; | 1579 | d->status = 0; |
1580 | 1580 | ||
1581 | if (++qh->iso_idx >= urb->number_of_packets) | 1581 | if (++qh->iso_idx >= urb->number_of_packets) |