Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67867
b: refs/heads/master
c: 6e8fe43
h: refs/heads/master
i:
  67865: 3228b6f
  67863: 9db9728
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent aecd148 commit cd5e22e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 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: 1f5a3d0f34fd5719081c6b8f3dbbcbe328d4da31
refs/heads/master: 6e8fe43b26085a64327d1cbb751ab895f3ad3f5d
24 changes: 8 additions & 16 deletions trunk/drivers/usb/host/ohci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,10 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)

/*-------------------------------------------------------------------------*/

static inline struct td *
ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
static void ed_halted(struct ohci_hcd *ohci, struct td *td, int cc)
{
struct urb *urb = td->urb;
urb_priv_t *urb_priv = urb->hcpriv;
struct ed *ed = td->ed;
struct list_head *tmp = td->td_list.next;
__hc32 toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C);
Expand All @@ -798,13 +798,12 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
wmb ();
ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H);

/* put any later tds from this urb onto the donelist, after 'td',
* order won't matter here: no errors, and nothing was transferred.
* also patch the ed so it looks as if those tds completed normally.
/* Get rid of all later tds from this urb. We don't have
* to be careful: no errors and nothing was transferred.
* Also patch the ed so it looks as if those tds completed normally.
*/
while (tmp != &ed->td_list) {
struct td *next;
__hc32 info;

next = list_entry (tmp, struct td, td_list);
tmp = next->td_list.next;
Expand All @@ -819,14 +818,9 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
* then we need to leave the control STATUS packet queued
* and clear ED_SKIP.
*/
info = next->hwINFO;
info |= cpu_to_hc32 (ohci, TD_DONE);
info &= ~cpu_to_hc32 (ohci, TD_CC);
next->hwINFO = info;

next->next_dl_td = rev;
rev = next;

list_del(&next->td_list);
urb_priv->td_cnt++;
ed->hwHeadP = next->hwNextTD | toggle;
}

Expand All @@ -852,8 +846,6 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
hc32_to_cpu (ohci, td->hwINFO),
cc, cc_to_error [cc]);
}

return rev;
}

/* replies to the request have to be on a FIFO basis so
Expand Down Expand Up @@ -890,7 +882,7 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
*/
if (cc != TD_CC_NOERROR
&& (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H)))
td_rev = ed_halted (ohci, td, cc, td_rev);
ed_halted(ohci, td, cc);

td->next_dl_td = td_rev;
td_rev = td;
Expand Down

0 comments on commit cd5e22e

Please sign in to comment.