]> git.baikalelectronics.ru Git - kernel.git/commit
usb: fix ->update_hub_device() vs hdev->maxchild
authorDan Williams <dan.j.williams@intel.com>
Thu, 5 Jun 2014 21:23:04 +0000 (14:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2014 23:44:57 +0000 (16:44 -0700)
commitdf29a66f78d12adbbc3205ffb6a728e393816ea0
tree07a23191fcf8a7adc7134a64553149436190c600
parent081ef54181a1ff0d2c7e189052277797ff8dd0dd
usb: fix ->update_hub_device() vs hdev->maxchild

Commit 7262bda38b58 "usb: assign default peer ports for root hubs"
delayed marking a hub valid (set hdev->maxchild) until it had been fully
configured and to enable the publishing of valid hubs to be serialized
by usb_port_peer_mutex.

However, xhci_update_hub_device() in some cases depends on
hdev->maxchild already being set.  Do the minimal fix and move it after
the setting of hdev->maxchild.

Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c