[USBSTOR]

-  Add forgotten storage of the LUN in the PDO extension which not only broke units beyond LUN 0 but also caused a BSOD due to reporting duplicate devices to the PnP manager
- Thanks to tower for reporting

svn path=/trunk/; revision=56406
This commit is contained in:
Cameron Gutman 2012-04-24 14:47:15 +00:00
parent 4fc848b780
commit d8580d250c
3 changed files with 4 additions and 1 deletions

View file

@ -264,7 +264,7 @@ USBSTOR_FdoHandleStartDevice(
// //
// create pdo // create pdo
// //
Status = USBSTOR_CreatePDO(DeviceObject, &DeviceExtension->ChildPDO[Index]); Status = USBSTOR_CreatePDO(DeviceObject, Index, &DeviceExtension->ChildPDO[Index]);
// //
// check for failure // check for failure

View file

@ -1256,6 +1256,7 @@ USBSTOR_SendFormatCapacityIrp(
NTSTATUS NTSTATUS
USBSTOR_CreatePDO( USBSTOR_CreatePDO(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN UCHAR LUN,
OUT PDEVICE_OBJECT *ChildDeviceObject) OUT PDEVICE_OBJECT *ChildDeviceObject)
{ {
PDEVICE_OBJECT PDO; PDEVICE_OBJECT PDO;
@ -1293,6 +1294,7 @@ USBSTOR_CreatePDO(
PDODeviceExtension->LowerDeviceObject = DeviceObject; PDODeviceExtension->LowerDeviceObject = DeviceObject;
PDODeviceExtension->PDODeviceObject = ChildDeviceObject; PDODeviceExtension->PDODeviceObject = ChildDeviceObject;
PDODeviceExtension->Self = PDO; PDODeviceExtension->Self = PDO;
PDODeviceExtension->LUN = LUN;
// //
// set device flags // set device flags

View file

@ -364,6 +364,7 @@ USBSTOR_PdoHandlePnp(
NTSTATUS NTSTATUS
USBSTOR_CreatePDO( USBSTOR_CreatePDO(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN UCHAR LUN,
OUT PDEVICE_OBJECT *ChildDeviceObject); OUT PDEVICE_OBJECT *ChildDeviceObject);
//--------------------------------------------------------------------- //---------------------------------------------------------------------