diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-07-14 11:03:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:40 -0400 |
commit | 88d8aa462b8a2128a75b96a0134b22f724ca45d1 (patch) | |
tree | 006b2e2d90cd303a8f2ae53debb9c5cfcd99ba84 /drivers/usb | |
parent | 1fb2e0558781b07d2ecaabf94c81c17ac820d8f0 (diff) |
USB: EHCI: remove dead code in the periodic scheduler
This patch (as1409) removes some dead code from the ehci-hcd
scheduler. Thanks to the previous patch in this series, stream->depth
is no longer used. And stream->start and stream->rescheduled
apparently have not been used for quite a while, except in some
statistics-reporting code that never gets invoked.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 15 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 3 |
2 files changed, 0 insertions, 18 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 3381319a2b3f..a92526d6e5ae 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1074,15 +1074,6 @@ iso_stream_put(struct ehci_hcd *ehci, struct ehci_iso_stream *stream) | |||
1074 | if (stream->ep) | 1074 | if (stream->ep) |
1075 | stream->ep->hcpriv = NULL; | 1075 | stream->ep->hcpriv = NULL; |
1076 | 1076 | ||
1077 | if (stream->rescheduled) { | ||
1078 | ehci_info (ehci, "ep%d%s-iso rescheduled " | ||
1079 | "%lu times in %lu seconds\n", | ||
1080 | stream->bEndpointAddress, is_in ? "in" : "out", | ||
1081 | stream->rescheduled, | ||
1082 | ((jiffies - stream->start)/HZ) | ||
1083 | ); | ||
1084 | } | ||
1085 | |||
1086 | kfree(stream); | 1077 | kfree(stream); |
1087 | } | 1078 | } |
1088 | } | 1079 | } |
@@ -1617,7 +1608,6 @@ itd_link_urb ( | |||
1617 | (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", | 1608 | (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", |
1618 | urb->interval, | 1609 | urb->interval, |
1619 | next_uframe >> 3, next_uframe & 0x7); | 1610 | next_uframe >> 3, next_uframe & 0x7); |
1620 | stream->start = jiffies; | ||
1621 | } | 1611 | } |
1622 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; | 1612 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; |
1623 | 1613 | ||
@@ -1643,7 +1633,6 @@ itd_link_urb ( | |||
1643 | itd_patch(ehci, itd, iso_sched, packet, uframe); | 1633 | itd_patch(ehci, itd, iso_sched, packet, uframe); |
1644 | 1634 | ||
1645 | next_uframe += stream->interval; | 1635 | next_uframe += stream->interval; |
1646 | stream->depth += stream->interval; | ||
1647 | next_uframe &= mod - 1; | 1636 | next_uframe &= mod - 1; |
1648 | packet++; | 1637 | packet++; |
1649 | 1638 | ||
@@ -1699,7 +1688,6 @@ itd_complete ( | |||
1699 | 1688 | ||
1700 | t = hc32_to_cpup(ehci, &itd->hw_transaction [uframe]); | 1689 | t = hc32_to_cpup(ehci, &itd->hw_transaction [uframe]); |
1701 | itd->hw_transaction [uframe] = 0; | 1690 | itd->hw_transaction [uframe] = 0; |
1702 | stream->depth -= stream->interval; | ||
1703 | 1691 | ||
1704 | /* report transfer status */ | 1692 | /* report transfer status */ |
1705 | if (unlikely (t & ISO_ERRS)) { | 1693 | if (unlikely (t & ISO_ERRS)) { |
@@ -2029,7 +2017,6 @@ sitd_link_urb ( | |||
2029 | (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", | 2017 | (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", |
2030 | (next_uframe >> 3) & (ehci->periodic_size - 1), | 2018 | (next_uframe >> 3) & (ehci->periodic_size - 1), |
2031 | stream->interval, hc32_to_cpu(ehci, stream->splits)); | 2019 | stream->interval, hc32_to_cpu(ehci, stream->splits)); |
2032 | stream->start = jiffies; | ||
2033 | } | 2020 | } |
2034 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; | 2021 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; |
2035 | 2022 | ||
@@ -2054,7 +2041,6 @@ sitd_link_urb ( | |||
2054 | sitd); | 2041 | sitd); |
2055 | 2042 | ||
2056 | next_uframe += stream->interval << 3; | 2043 | next_uframe += stream->interval << 3; |
2057 | stream->depth += stream->interval << 3; | ||
2058 | } | 2044 | } |
2059 | stream->next_uframe = next_uframe & (mod - 1); | 2045 | stream->next_uframe = next_uframe & (mod - 1); |
2060 | 2046 | ||
@@ -2114,7 +2100,6 @@ sitd_complete ( | |||
2114 | desc->actual_length = desc->length - SITD_LENGTH(t); | 2100 | desc->actual_length = desc->length - SITD_LENGTH(t); |
2115 | urb->actual_length += desc->actual_length; | 2101 | urb->actual_length += desc->actual_length; |
2116 | } | 2102 | } |
2117 | stream->depth -= stream->interval << 3; | ||
2118 | 2103 | ||
2119 | /* handle completion now? */ | 2104 | /* handle completion now? */ |
2120 | if ((urb_index + 1) != urb->number_of_packets) | 2105 | if ((urb_index + 1) != urb->number_of_packets) |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 2c050efd1deb..e5b9ece8a077 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -404,15 +404,12 @@ struct ehci_iso_stream { | |||
404 | u32 refcount; | 404 | u32 refcount; |
405 | u8 bEndpointAddress; | 405 | u8 bEndpointAddress; |
406 | u8 highspeed; | 406 | u8 highspeed; |
407 | u16 depth; /* depth in uframes */ | ||
408 | struct list_head td_list; /* queued itds/sitds */ | 407 | struct list_head td_list; /* queued itds/sitds */ |
409 | struct list_head free_list; /* list of unused itds/sitds */ | 408 | struct list_head free_list; /* list of unused itds/sitds */ |
410 | struct usb_device *udev; | 409 | struct usb_device *udev; |
411 | struct usb_host_endpoint *ep; | 410 | struct usb_host_endpoint *ep; |
412 | 411 | ||
413 | /* output of (re)scheduling */ | 412 | /* output of (re)scheduling */ |
414 | unsigned long start; /* jiffies */ | ||
415 | unsigned long rescheduled; | ||
416 | int next_uframe; | 413 | int next_uframe; |
417 | __hc32 splits; | 414 | __hc32 splits; |
418 | 415 | ||