Author: cgutman
Date: Tue Apr 24 14:47:15 2012
New Revision: 56406
URL:
http://svn.reactos.org/svn/reactos?rev=56406&view=rev
Log:
[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
Modified:
trunk/reactos/drivers/usb/usbstor/fdo.c
trunk/reactos/drivers/usb/usbstor/pdo.c
trunk/reactos/drivers/usb/usbstor/usbstor.h
Modified: trunk/reactos/drivers/usb/usbstor/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/fdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/fdo.c [iso-8859-1] Tue Apr 24 14:47:15 2012
@@ -264,7 +264,7 @@
//
// create pdo
//
- Status = USBSTOR_CreatePDO(DeviceObject,
&DeviceExtension->ChildPDO[Index]);
+ Status = USBSTOR_CreatePDO(DeviceObject, Index,
&DeviceExtension->ChildPDO[Index]);
//
// check for failure
Modified: trunk/reactos/drivers/usb/usbstor/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/pdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] Tue Apr 24 14:47:15 2012
@@ -1256,6 +1256,7 @@
NTSTATUS
USBSTOR_CreatePDO(
IN PDEVICE_OBJECT DeviceObject,
+ IN UCHAR LUN,
OUT PDEVICE_OBJECT *ChildDeviceObject)
{
PDEVICE_OBJECT PDO;
@@ -1293,6 +1294,7 @@
PDODeviceExtension->LowerDeviceObject = DeviceObject;
PDODeviceExtension->PDODeviceObject = ChildDeviceObject;
PDODeviceExtension->Self = PDO;
+ PDODeviceExtension->LUN = LUN;
//
// set device flags
Modified: trunk/reactos/drivers/usb/usbstor/usbstor.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/usbsto…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/usbstor.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/usbstor.h [iso-8859-1] Tue Apr 24 14:47:15 2012
@@ -364,6 +364,7 @@
NTSTATUS
USBSTOR_CreatePDO(
IN PDEVICE_OBJECT DeviceObject,
+ IN UCHAR LUN,
OUT PDEVICE_OBJECT *ChildDeviceObject);
//---------------------------------------------------------------------