Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248872
b: refs/heads/master
c: c51e36d
h: refs/heads/master
v: v3
  • Loading branch information
Sergei Shtylyov authored and Felipe Balbi committed May 13, 2011
1 parent 27786dc commit 70ce96a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 981430a1704123b569865997bdde4f1de1afca7e
refs/heads/master: c51e36dc11e44aa960744ec1c36fb2ab8d68b218
49 changes: 22 additions & 27 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,33 +837,28 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
/* kick things off */

if ((is_cppi_enabled() || tusb_dma_omap()) && dma_channel) {
/* candidate for DMA */
if (dma_channel) {
dma_channel->actual_len = 0L;
qh->segsize = len;

/* AUTOREQ is in a DMA register */
musb_writew(hw_ep->regs, MUSB_RXCSR, csr);
csr = musb_readw(hw_ep->regs,
MUSB_RXCSR);

/* unless caller treats short rx transfers as
* errors, we dare not queue multiple transfers.
*/
dma_ok = dma_controller->channel_program(
dma_channel, packet_sz,
!(urb->transfer_flags
& URB_SHORT_NOT_OK),
urb->transfer_dma + offset,
qh->segsize);
if (!dma_ok) {
dma_controller->channel_release(
dma_channel);
hw_ep->rx_channel = NULL;
dma_channel = NULL;
} else
csr |= MUSB_RXCSR_DMAENAB;
}
/* Candidate for DMA */
dma_channel->actual_len = 0L;
qh->segsize = len;

/* AUTOREQ is in a DMA register */
musb_writew(hw_ep->regs, MUSB_RXCSR, csr);
csr = musb_readw(hw_ep->regs, MUSB_RXCSR);

/*
* Unless caller treats short RX transfers as
* errors, we dare not queue multiple transfers.
*/
dma_ok = dma_controller->channel_program(dma_channel,
packet_sz, !(urb->transfer_flags &
URB_SHORT_NOT_OK),
urb->transfer_dma + offset,
qh->segsize);
if (!dma_ok) {
dma_controller->channel_release(dma_channel);
hw_ep->rx_channel = dma_channel = NULL;
} else
csr |= MUSB_RXCSR_DMAENAB;
}

csr |= MUSB_RXCSR_H_REQPKT;
Expand Down

0 comments on commit 70ce96a

Please sign in to comment.