aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-09-04 13:53:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:40 -0400
commitb356b7c7696b289dda99022d71e3979c6134af52 (patch)
treef9fdccb5ce6ec0af42b075a858f0a3f1eb525c31 /drivers/usb/core/hub.c
parentac1c1b7f16ed287fcec5bcfae06d0165c3941ec3 (diff)
USB: Add hub descriptor update hook for xHCI
Add a hook for updating xHCI internal structures after khubd fetches the hub descriptor and sets up the hub's TT information. The xHCI driver must update the internal structures before devices under the hub can be enumerated. 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/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index a880516020f..5ce839137ad 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -860,6 +860,7 @@ static int hub_post_reset(struct usb_interface *intf)
860static int hub_configure(struct usb_hub *hub, 860static int hub_configure(struct usb_hub *hub,
861 struct usb_endpoint_descriptor *endpoint) 861 struct usb_endpoint_descriptor *endpoint)
862{ 862{
863 struct usb_hcd *hcd;
863 struct usb_device *hdev = hub->hdev; 864 struct usb_device *hdev = hub->hdev;
864 struct device *hub_dev = hub->intfdev; 865 struct device *hub_dev = hub->intfdev;
865 u16 hubstatus, hubchange; 866 u16 hubstatus, hubchange;
@@ -1061,6 +1062,19 @@ static int hub_configure(struct usb_hub *hub,
1061 dev_dbg(hub_dev, "%umA bus power budget for each child\n", 1062 dev_dbg(hub_dev, "%umA bus power budget for each child\n",
1062 hub->mA_per_port); 1063 hub->mA_per_port);
1063 1064
1065 /* Update the HCD's internal representation of this hub before khubd
1066 * starts getting port status changes for devices under the hub.
1067 */
1068 hcd = bus_to_hcd(hdev->bus);
1069 if (hcd->driver->update_hub_device) {
1070 ret = hcd->driver->update_hub_device(hcd, hdev,
1071 &hub->tt, GFP_KERNEL);
1072 if (ret < 0) {
1073 message = "can't update HCD hub info";
1074 goto fail;
1075 }
1076 }
1077
1064 ret = hub_hub_status(hub, &hubstatus, &hubchange); 1078 ret = hub_hub_status(hub, &hubstatus, &hubchange);
1065 if (ret < 0) { 1079 if (ret < 0) {
1066 message = "can't get hub status"; 1080 message = "can't get hub status";