diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-04-27 22:58:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:49 -0400 |
commit | f94e0186312b0fc39f41eed4e21836ed74b7efe1 (patch) | |
tree | d445d846f62c23cfbefc4958168d9cf4bacea3a4 /drivers/usb/host/xhci-pci.c | |
parent | 79abb1ab13cee5ba488210798b6e7bbae0b391ac (diff) |
USB: xhci: Bandwidth allocation support
Since the xHCI host controller hardware (xHC) has an internal schedule, it
needs a better representation of what devices are consuming bandwidth on
the bus. Each device is represented by a device context, with data about
the device, endpoints, and pointers to each endpoint ring.
We need to update the endpoint information for a device context before a
new configuration or alternate interface setting is selected. We setup an
input device context with modified endpoint information and newly
allocated endpoint rings, and then submit a Configure Endpoint Command to
the hardware.
The host controller can reject the new configuration if it exceeds the bus
bandwidth, or the host controller doesn't have enough internal resources
for the configuration. If the command fails, we still have the older
device context with the previous configuration. If the command succeeds,
we free the old endpoint rings.
The root hub isn't a real device, so always say yes to any bandwidth
changes for it.
The USB core will enable, disable, and then enable endpoint 0 several
times during the initialization sequence. The device will always have an
endpoint ring for endpoint 0 and bandwidth allocated for that, unless the
device is disconnected or gets a SetAddress 0 request. So we don't pay
attention for when xhci_check_bandwidth() is called for a re-add of
endpoint 0.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index ff9a4ef22338..1462709e26c0 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -115,6 +115,10 @@ static const struct hc_driver xhci_pci_hc_driver = { | |||
115 | .urb_dequeue = xhci_urb_dequeue, | 115 | .urb_dequeue = xhci_urb_dequeue, |
116 | .alloc_dev = xhci_alloc_dev, | 116 | .alloc_dev = xhci_alloc_dev, |
117 | .free_dev = xhci_free_dev, | 117 | .free_dev = xhci_free_dev, |
118 | .add_endpoint = xhci_add_endpoint, | ||
119 | .drop_endpoint = xhci_drop_endpoint, | ||
120 | .check_bandwidth = xhci_check_bandwidth, | ||
121 | .reset_bandwidth = xhci_reset_bandwidth, | ||
118 | .address_device = xhci_address_device, | 122 | .address_device = xhci_address_device, |
119 | 123 | ||
120 | /* | 124 | /* |