Author: cgutman
Date: Fri Feb 10 17:14:39 2012
New Revision: 55526
URL:
http://svn.reactos.org/svn/reactos?rev=55526&view=rev
Log:
[CLASS2]
- Fix boot from HDD with USB drive present
- Fix USB drive failure with no HDD present
Modified:
branches/usb-bringup-trunk/drivers/storage/class/class2/class2.c
Modified: branches/usb-bringup-trunk/drivers/storage/class/class2/class2.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/stora…
==============================================================================
--- branches/usb-bringup-trunk/drivers/storage/class/class2/class2.c [iso-8859-1]
(original)
+++ branches/usb-bringup-trunk/drivers/storage/class/class2/class2.c [iso-8859-1] Fri Feb
10 17:14:39 2012
@@ -11,6 +11,10 @@
#include <scsi.h>
#include <include/class2.h>
#include <stdio.h>
+
+/* Part of the drive letter hack */
+#include <ntifs.h>
+#include <ketypes.h>
//#define NDEBUG
#include <debug.h>
@@ -371,8 +375,16 @@
/* Attach it to the PDO */
DeviceInfo->LowerDevice = IoAttachDeviceToDeviceStack(DeviceObject,
PhysicalDeviceObject);
- /* Assign a drive letter */
- ScsiClassAssignDriveLetter(DeviceInfo);
+ /* Check that the kernel has already assigned drive letters */
+ if (KeLoaderBlock == NULL)
+ {
+ /* Assign a drive letter */
+ ScsiClassAssignDriveLetter(DeviceInfo);
+ }
+ else
+ {
+ /* The kernel will handle it */
+ }
/* Move to the next port number */
DriverExtension->PortNumber++;
@@ -533,7 +545,8 @@
} while(NT_SUCCESS(status));
- return deviceFound ? STATUS_SUCCESS : STATUS_NO_SUCH_DEVICE;
+ /* We don't want to fail init just because we don't have devices right now
*/
+ return STATUS_SUCCESS; /*deviceFound ? STATUS_SUCCESS : STATUS_NO_SUCH_DEVICE;*/
}