于 2012/8/22 22:32, Alan Stern 写道:
On Wed, 22 Aug 2012, Lan Tianyu wrote:
@@ -1560,6 +1560,10 @@ static int hub_configure(struct usb_hub *hub,
dev_err(hub->intfdev,
"couldn't create port%d device.\n", i + 1);
+ /* Get hub descriptor again to sync port's DeviceRemovable
+ * after the usb port devices being created.
+ */
+ get_hub_descriptor(hdev, hub->descriptor);
Why is this needed? Do you have any reason to think the hub descriptor
has changed since the first time we retrieved it?
At first time, the usb port devices have not been created and not bound
with acpi. So at that time, port's DeviceRemovable is not set according
acpi information. After ports' devices are created, binding procedure is
completed. Request hub descriptor again and DeviceRemovable will be
updated by acpi information.
Why not just update the ACPI information using the current hub
descriptor? You don't need to fetch the hub descriptor again.
You mean to set DeviceRemovable directly rather than via hub descriptor request
here, right?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html