Author: janderwald
Date: Wed Jun 1 08:31:33 2011
New Revision: 52036
URL:
http://svn.reactos.org/svn/reactos?rev=52036&view=rev
Log:
[USBHUB_NEW]
- Check if the port is usb 2.0 controller. In that case call the Usb2.0 initialize
function
- Prevents crash when used with usbohci
Modified:
branches/usb-bringup/drivers/usb/usbhub_new/fdo.c
Modified: branches/usb-bringup/drivers/usb/usbhub_new/fdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbhub_…
==============================================================================
--- branches/usb-bringup/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original)
+++ branches/usb-bringup/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Wed Jun 1 08:31:33
2011
@@ -1559,11 +1559,28 @@
DPRINT1("Configuration Handle %x\n",
HubDeviceExtension->ConfigurationHandle);
//
- // Initialize the Hub
- //
- Status =
HubDeviceExtension->HubInterface.Initialize20Hub(HubInterfaceBusContext,
-
HubDeviceExtension->RootHubHandle, 1);
- DPRINT1("Status %x\n", Status);
+ // check if function is available
+ //
+ if (HubDeviceExtension->UsbDInterface.IsDeviceHighSpeed)
+ {
+ //
+ // is it high speed bus
+ //
+ if
(HubDeviceExtension->UsbDInterface.IsDeviceHighSpeed(HubInterfaceBusContext))
+ {
+ //
+ // initialize usb 2.0 hub
+ //
+ Status =
HubDeviceExtension->HubInterface.Initialize20Hub(HubInterfaceBusContext,
+
HubDeviceExtension->RootHubHandle, 1);
+ DPRINT1("Status %x\n", Status);
+
+ //
+ // FIXME handle error
+ //
+ ASSERT(Status == STATUS_SUCCESS);
+ }
+ }
ExFreePool(ConfigUrb);
@@ -1585,8 +1602,9 @@
}
DPRINT1("RootHubInitNotification %x\n",
HubDeviceExtension->HubInterface.RootHubInitNotification);
- //
- //
+
+ //
+ // init roo hub notification
//
if (HubDeviceExtension->HubInterface.RootHubInitNotification)
{