Author: janderwald
Date: Fri Feb 17 03:44:56 2012
New Revision: 55661
URL:
http://svn.reactos.org/svn/reactos?rev=55661&view=rev
Log:
[USBSTOR]
- Only send read format capacity when the device type is zero (direct access device)
- Add fixme
[INF]
- Fix issue
- USB CDROM installation now starts
Modified:
trunk/reactos/drivers/usb/usbstor/error.c
trunk/reactos/drivers/usb/usbstor/pdo.c
trunk/reactos/media/inf/cdrom.inf
Modified: trunk/reactos/drivers/usb/usbstor/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/error.…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/error.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/error.c [iso-8859-1] Fri Feb 17 03:44:56 2012
@@ -210,7 +210,15 @@
if (NT_SUCCESS(Status))
{
- DPRINT1("Retrying Count %x\n", Context->RetryCount);
+ //
+ // FIXME: inquiry cmd / read format capacity are send w/o irp
+ //
+ ASSERT(Context);
+ ASSERT(Context->PDODeviceExtension);
+ ASSERT(Context->PDODeviceExtension->Self);
+ ASSERT(Context->Irp);
+
+ DPRINT1("Retrying Count %x %p\n", Context->RetryCount,
Context->PDODeviceExtension->Self);
//
// re-schedule request
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] Fri Feb 17 03:44:56 2012
@@ -964,6 +964,7 @@
PDEVICE_OBJECT PDO;
NTSTATUS Status;
PPDO_DEVICE_EXTENSION PDODeviceExtension;
+ PUFI_INQUIRY_RESPONSE Response;
//
// create child device object
@@ -1012,22 +1013,36 @@
*ChildDeviceObject = PDO;
//
- // send inquiry command
+ // FIXME: send inquiry command by irp
//
USBSTOR_SendInquiryCmd(PDO, 0);
//
- // retrieve format capacity
- //
- if (NT_SUCCESS(USBSTOR_SendFormatCapacity(PDO, 0)))
- {
- //
- // check if its a floppy
- //
- PDODeviceExtension->IsFloppy =
USBSTOR_IsFloppy(PDODeviceExtension->FormatData, PAGE_SIZE /*FIXME*/,
&PDODeviceExtension->MediumTypeCode);
- DPRINT1("[USBSTOR] IsFloppy %x MediumTypeCode %x\n",
PDODeviceExtension->IsFloppy, PDODeviceExtension->MediumTypeCode);
- }
-
+ // check response data
+ //
+ Response = (PUFI_INQUIRY_RESPONSE)PDODeviceExtension->InquiryData;
+ ASSERT(Response);
+
+ if (Response->DeviceType == 0)
+ {
+ //
+ // check if it is a floppy
+ //
+ Status = USBSTOR_SendFormatCapacity(PDO, 0);
+ if (NT_SUCCESS(Status))
+ {
+ //
+ // check if its a floppy
+ //
+ PDODeviceExtension->IsFloppy =
USBSTOR_IsFloppy(PDODeviceExtension->FormatData, PAGE_SIZE /*FIXME*/,
&PDODeviceExtension->MediumTypeCode);
+ DPRINT1("[USBSTOR] IsFloppy %x MediumTypeCode %x\n",
PDODeviceExtension->IsFloppy, PDODeviceExtension->MediumTypeCode);
+ }
+
+ //
+ // failing command is non critical
+ //
+ Status = STATUS_SUCCESS;
+ }
//
Modified: trunk/reactos/media/inf/cdrom.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/cdrom.inf?rev=55…
==============================================================================
Binary files - no diff available.