Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132460
b: refs/heads/master
c: 508db8c
h: refs/heads/master
v: v3
  • Loading branch information
Karsten Wiese authored and Greg Kroah-Hartman committed Mar 17, 2009
1 parent b9c85ca commit 5ceb093
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 9ea19b82f3126da4e47d6b94563a3c2cd586f6e2
refs/heads/master: 508db8c954d55ed30f870d2c24d741ba6269d13c
10 changes: 4 additions & 6 deletions trunk/drivers/usb/host/ehci-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ itd_link_urb (
struct ehci_itd, itd_list);
list_move_tail (&itd->itd_list, &stream->td_list);
itd->stream = iso_stream_get (stream);
itd->urb = usb_get_urb (urb);
itd->urb = urb;
itd_init (ehci, stream, itd);
}

Expand Down Expand Up @@ -1645,7 +1645,7 @@ itd_complete (
(void) disable_periodic(ehci);
ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;

if (unlikely (list_empty (&stream->td_list))) {
if (unlikely(list_is_singular(&stream->td_list))) {
ehci_to_hcd(ehci)->self.bandwidth_allocated
-= stream->bandwidth;
ehci_vdbg (ehci,
Expand All @@ -1656,7 +1656,6 @@ itd_complete (
iso_stream_put (ehci, stream);

done:
usb_put_urb(urb);
itd->urb = NULL;
if (ehci->clock_frame != itd->frame || itd->index[7] != -1) {
/* OK to recycle this ITD now. */
Expand Down Expand Up @@ -1949,7 +1948,7 @@ sitd_link_urb (
struct ehci_sitd, sitd_list);
list_move_tail (&sitd->sitd_list, &stream->td_list);
sitd->stream = iso_stream_get (stream);
sitd->urb = usb_get_urb (urb);
sitd->urb = urb;

sitd_patch(ehci, stream, sitd, sched, packet);
sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size,
Expand Down Expand Up @@ -2034,7 +2033,7 @@ sitd_complete (
(void) disable_periodic(ehci);
ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;

if (list_empty (&stream->td_list)) {
if (list_is_singular(&stream->td_list)) {
ehci_to_hcd(ehci)->self.bandwidth_allocated
-= stream->bandwidth;
ehci_vdbg (ehci,
Expand All @@ -2045,7 +2044,6 @@ sitd_complete (
iso_stream_put (ehci, stream);
/* OK to recycle this SITD now that its completion callback ran. */
done:
usb_put_urb(urb);
sitd->urb = NULL;
sitd->stream = NULL;
list_move(&sitd->sitd_list, &stream->free_list);
Expand Down

0 comments on commit 5ceb093

Please sign in to comment.