Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133541
b: refs/heads/master
c: 7ea0a2b
h: refs/heads/master
i:
  133539: a18e0b7
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent 4ce9ca9 commit b23e16d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 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: 66760169492445395c530c812443f58e2cfdb3dc
refs/heads/master: 7ea0a2bcfe40b1c525e63e931b7142ab22b64269
4 changes: 3 additions & 1 deletion trunk/drivers/usb/host/uhci-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
}

out += sprintf(out, "%s%s", ptype, (urbp->fsbr ? " FSBR" : ""));
out += sprintf(out, " Actlen=%d", urbp->urb->actual_length);
out += sprintf(out, " Actlen=%d%s", urbp->urb->actual_length,
(urbp->qh->type == USB_ENDPOINT_XFER_CONTROL ?
"-8" : ""));

if (urbp->urb->unlinked)
out += sprintf(out, " Unlinked=%d", urbp->urb->unlinked);
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/usb/host/uhci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,6 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb,
}
if (qh->state != QH_STATE_ACTIVE)
qh->skel = skel;

urb->actual_length = -8; /* Account for the SETUP packet */
return 0;

nomem:
Expand Down Expand Up @@ -1494,11 +1492,10 @@ __acquires(uhci->lock)

if (qh->type == USB_ENDPOINT_XFER_CONTROL) {

/* urb->actual_length < 0 means the setup transaction didn't
* complete successfully. Either it failed or the URB was
* unlinked first. Regardless, don't confuse people with a
* negative length. */
urb->actual_length = max(urb->actual_length, 0);
/* Subtract off the length of the SETUP packet from
* urb->actual_length.
*/
urb->actual_length -= min_t(u32, 8, urb->actual_length);
}

/* When giving back the first URB in an Isochronous queue,
Expand Down

0 comments on commit b23e16d

Please sign in to comment.