[USBSTOR]
authorCameron Gutman <aicommander@gmail.com>
Wed, 25 Jan 2012 00:03:18 +0000 (00:03 +0000)
committerCameron Gutman <aicommander@gmail.com>
Wed, 25 Jan 2012 00:03:18 +0000 (00:03 +0000)
- Don't lie about removable media support for anything except hard drives

svn path=/branches/usb-bringup-trunk/; revision=55160

drivers/usb/usbstor/disk.c

index 0333e9e..0f426c8 100644 (file)
@@ -639,7 +639,10 @@ USBSTOR_HandleDeviceControl(
         RtlZeroMemory(ScsiInquiryData, sizeof(INQUIRYDATA));
         ScsiInquiryData->DeviceType = UFIInquiryResponse->DeviceType;
         ScsiInquiryData->DeviceTypeQualifier = (UFIInquiryResponse->RMB & 0x7F);
         RtlZeroMemory(ScsiInquiryData, sizeof(INQUIRYDATA));
         ScsiInquiryData->DeviceType = UFIInquiryResponse->DeviceType;
         ScsiInquiryData->DeviceTypeQualifier = (UFIInquiryResponse->RMB & 0x7F);
-        ScsiInquiryData->RemovableMedia = FALSE; //HACK for IoReadPartitionTable
+
+        /* Hack for IoReadPartitionTable call in disk.sys */
+        ScsiInquiryData->RemovableMedia = (ScsiInquiryData->DeviceType != DIRECT_ACCESS_DEVICE) ? 1 : 0;
+
         ScsiInquiryData->Versions = 0x04;
         ScsiInquiryData->ResponseDataFormat = 0x02;
         ScsiInquiryData->AdditionalLength = 31;
         ScsiInquiryData->Versions = 0x04;
         ScsiInquiryData->ResponseDataFormat = 0x02;
         ScsiInquiryData->AdditionalLength = 31;