Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133533
b: refs/heads/master
c: 5d67a85
h: refs/heads/master
i:
  133531: 11d1610
v: v3
  • Loading branch information
Sergei Shtylyov authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent 3765e40 commit ae16178
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 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: b2bdf3a789162aa6ff9c6f139bee9cc7954bc5b4
refs/heads/master: 5d67a851bca63d30cde0474bfc4fc4f03db1a1b8
1 change: 0 additions & 1 deletion trunk/drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ struct musb {
struct list_head control; /* of musb_qh */
struct list_head in_bulk; /* of musb_qh */
struct list_head out_bulk; /* of musb_qh */
struct musb_qh *periodic[32]; /* tree of interrupt+iso */
#endif

/* called with IRQs blocked; ON/nonzero implies starting a session,
Expand Down
28 changes: 11 additions & 17 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
* de-allocated if it's tracked and allocated;
* and where we'd update the schedule tree...
*/
musb->periodic[ep->epnum] = NULL;
kfree(qh);
qh = NULL;
break;
Expand Down Expand Up @@ -1711,31 +1710,27 @@ static int musb_schedule(

/* else, periodic transfers get muxed to other endpoints */

/* FIXME this doesn't consider direction, so it can only
* work for one half of the endpoint hardware, and assumes
* the previous cases handled all non-shared endpoints...
*/

/* we know this qh hasn't been scheduled, so all we need to do
/*
* We know this qh hasn't been scheduled, so all we need to do
* is choose which hardware endpoint to put it on ...
*
* REVISIT what we really want here is a regular schedule tree
* like e.g. OHCI uses, but for now musb->periodic is just an
* array of the _single_ logical endpoint associated with a
* given physical one (identity mapping logical->physical).
*
* that simplistic approach makes TT scheduling a lot simpler;
* there is none, and thus none of its complexity...
* like e.g. OHCI uses.
*/
best_diff = 4096;
best_end = -1;

for (epnum = 1; epnum < musb->nr_endpoints; epnum++) {
for (epnum = 1, hw_ep = musb->endpoints + 1;
epnum < musb->nr_endpoints;
epnum++, hw_ep++) {
int diff;

if (musb->periodic[epnum])
if (is_in || hw_ep->is_shared_fifo) {
if (hw_ep->in_qh != NULL)
continue;
} else if (hw_ep->out_qh != NULL)
continue;
hw_ep = &musb->endpoints[epnum];

if (hw_ep == musb->bulk_ep)
continue;

Expand Down Expand Up @@ -1764,7 +1759,6 @@ static int musb_schedule(
idle = 1;
qh->mux = 0;
hw_ep = musb->endpoints + best_end;
musb->periodic[best_end] = qh;
DBG(4, "qh %p periodic slot %d\n", qh, best_end);
success:
if (head) {
Expand Down

0 comments on commit ae16178

Please sign in to comment.