Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185285
b: refs/heads/master
c: 5274dab
h: refs/heads/master
i:
  185283: b52929e
v: v3
  • Loading branch information
Swaminathan S authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent e297cb5 commit 3de7a67
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f933a0c0fe0ea5f49a35bcd45e3e4850e0606cba
refs/heads/master: 5274dab6cb99c529b2e7f16bbc8ff9a79be46e7f
24 changes: 24 additions & 0 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,9 @@ static int musb_schedule(
int best_end, epnum;
struct musb_hw_ep *hw_ep = NULL;
struct list_head *head = NULL;
u8 toggle;
u8 txtype;
struct urb *urb = next_urb(qh);

/* use fixed hardware for control and bulk */
if (qh->type == USB_ENDPOINT_XFER_CONTROL) {
Expand Down Expand Up @@ -1809,6 +1812,27 @@ static int musb_schedule(
diff -= (qh->maxpacket * qh->hb_mult);

if (diff >= 0 && best_diff > diff) {

/*
* Mentor controller has a bug in that if we schedule
* a BULK Tx transfer on an endpoint that had earlier
* handled ISOC then the BULK transfer has to start on
* a zero toggle. If the BULK transfer starts on a 1
* toggle then this transfer will fail as the mentor
* controller starts the Bulk transfer on a 0 toggle
* irrespective of the programming of the toggle bits
* in the TXCSR register. Check for this condition
* while allocating the EP for a Tx Bulk transfer. If
* so skip this EP.
*/
hw_ep = musb->endpoints + epnum;
toggle = usb_gettoggle(urb->dev, qh->epnum, !is_in);
txtype = (musb_readb(hw_ep->regs, MUSB_TXTYPE)
>> 4) & 0x3;
if (!is_in && (qh->type == USB_ENDPOINT_XFER_BULK) &&
toggle && (txtype == USB_ENDPOINT_XFER_ISOC))
continue;

best_diff = diff;
best_end = epnum;
}
Expand Down

0 comments on commit 3de7a67

Please sign in to comment.