aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:22:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 19:54:26 -0400
commit8c5bf7be56f1a8aecc1f802f132d53f556a9bc45 (patch)
treed3b22a284f3f81b804bf9898928f866cfb8a45cd /drivers/usb/host/ehci-hcd.c
parent55934eb3b9fa52eb53b9d7342267fc73c38206aa (diff)
USB: EHCI: don't refcount iso_stream structures
This patch (as1580) makes ehci_iso_stream structures behave more like QHs, in that they will remain allocated until their isochronous endpoint is disabled. This will come in useful in the future, when periodic bandwidth gets allocated as an altsetting is installed rather than on-the-fly. For now, the change to the ehci_iso_stream lifetimes means that each structure is always deallocated at exactly one spot in ehci_endpoint_disable() and never used again. As a result, it is no longer necessary to use reference counting on these things, and the patch removes it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 98b945840c9e..fb1966cf5649 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1085,8 +1085,14 @@ rescan:
1085 * accelerate iso completions ... so spin a while. 1085 * accelerate iso completions ... so spin a while.
1086 */ 1086 */
1087 if (qh->hw == NULL) { 1087 if (qh->hw == NULL) {
1088 ehci_vdbg (ehci, "iso delay\n"); 1088 struct ehci_iso_stream *stream = ep->hcpriv;
1089 goto idle_timeout; 1089
1090 if (!list_empty(&stream->td_list))
1091 goto idle_timeout;
1092
1093 /* BUG_ON(!list_empty(&stream->free_list)); */
1094 kfree(stream);
1095 goto done;
1090 } 1096 }
1091 1097
1092 if (ehci->rh_state < EHCI_RH_RUNNING) 1098 if (ehci->rh_state < EHCI_RH_RUNNING)
@@ -1127,8 +1133,8 @@ idle_timeout:
1127 list_empty (&qh->qtd_list) ? "" : "(has tds)"); 1133 list_empty (&qh->qtd_list) ? "" : "(has tds)");
1128 break; 1134 break;
1129 } 1135 }
1136 done:
1130 ep->hcpriv = NULL; 1137 ep->hcpriv = NULL;
1131done:
1132 spin_unlock_irqrestore (&ehci->lock, flags); 1138 spin_unlock_irqrestore (&ehci->lock, flags);
1133} 1139}
1134 1140