Skip to content

Commit 869e9e5

Browse files
committed
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
2 parents 2c53b43 + 4858f06 commit 869e9e5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

drivers/usb/musb/musb_gadget.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,12 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep)
15241524
csr = musb_readw(epio, MUSB_TXCSR);
15251525
if (csr & MUSB_TXCSR_FIFONOTEMPTY) {
15261526
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;
15271533
musb_writew(epio, MUSB_TXCSR, csr);
15281534
/* REVISIT may be inappropriate w/o FIFONOTEMPTY ... */
15291535
musb_writew(epio, MUSB_TXCSR, csr);

drivers/usb/musb/musb_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ void musb_host_rx(struct musb *musb, u8 epnum)
15751575
/* even if there was an error, we did the dma
15761576
* for iso_frame_desc->length
15771577
*/
1578-
if (d->status != EILSEQ && d->status != -EOVERFLOW)
1578+
if (d->status != -EILSEQ && d->status != -EOVERFLOW)
15791579
d->status = 0;
15801580

15811581
if (++qh->iso_idx >= urb->number_of_packets)

0 commit comments

Comments
 (0)