mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
USB 2.5.0 -> 2.6.14.3 upgrade: Store actual bus number by querying upper-laying driver.
svn path=/trunk/; revision=20378
This commit is contained in:
@@ -58,6 +58,8 @@ UsbMpFdoStartDevice(
|
||||
PUSBMP_DRIVER_EXTENSION DriverExtension;
|
||||
PUSBMP_DEVICE_EXTENSION DeviceExtension;
|
||||
PCM_RESOURCE_LIST AllocatedResources;
|
||||
ULONG Size;
|
||||
NTSTATUS Status;
|
||||
|
||||
if (DeviceObject == KeyboardFdo || DeviceObject == MouseFdo)
|
||||
return STATUS_SUCCESS;
|
||||
@@ -142,6 +144,23 @@ UsbMpFdoStartDevice(
|
||||
DeviceExtension->BaseAddress,
|
||||
DeviceExtension->BaseAddrLength);
|
||||
|
||||
/* Get bus number from the upper level bus driver. */
|
||||
Size = sizeof(ULONG);
|
||||
Status = IoGetDeviceProperty(
|
||||
DeviceExtension->PhysicalDeviceObject,
|
||||
DevicePropertyBusNumber,
|
||||
Size,
|
||||
&DeviceExtension->SystemIoBusNumber,
|
||||
&Size);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("USBMP: IoGetDeviceProperty DevicePropertyBusNumber failed\n");
|
||||
DeviceExtension->SystemIoBusNumber = 0;
|
||||
}
|
||||
|
||||
DPRINT("USBMP: Busnumber %d\n", DeviceExtension->SystemIoBusNumber);
|
||||
|
||||
/* Init wrapper with this object */
|
||||
return InitLinuxWrapper(DeviceObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user