From e3d0e34a1823564172e4cd9ffb0b8dcfe16868c0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 25 Jan 2012 01:09:59 +0000 Subject: [PATCH] [USBSTOR] - Get the actual value for the removable media bit instead of hardcoding it to true svn path=/branches/usb-bringup-trunk/; revision=55165 --- drivers/usb/usbstor/disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/usbstor/disk.c b/drivers/usb/usbstor/disk.c index 0f426c8e26b..5a776d4efee 100644 --- a/drivers/usb/usbstor/disk.c +++ b/drivers/usb/usbstor/disk.c @@ -390,7 +390,7 @@ USBSTOR_HandleQueryProperty( DeviceDescriptor->Size = TotalLength; DeviceDescriptor->DeviceType = InquiryData->DeviceType; DeviceDescriptor->DeviceTypeModifier = (InquiryData->RMB & 0x7F); - DeviceDescriptor->RemovableMedia = TRUE; + DeviceDescriptor->RemovableMedia = (InquiryData->RMB & 0x80) ? TRUE : FALSE; DeviceDescriptor->CommandQueueing = FALSE; DeviceDescriptor->BusType = BusTypeUsb; DeviceDescriptor->VendorIdOffset = sizeof(STORAGE_DEVICE_DESCRIPTOR) - sizeof(UCHAR); @@ -641,7 +641,7 @@ USBSTOR_HandleDeviceControl( ScsiInquiryData->DeviceTypeQualifier = (UFIInquiryResponse->RMB & 0x7F); /* Hack for IoReadPartitionTable call in disk.sys */ - ScsiInquiryData->RemovableMedia = (ScsiInquiryData->DeviceType != DIRECT_ACCESS_DEVICE) ? 1 : 0; + ScsiInquiryData->RemovableMedia = ((ScsiInquiryData->DeviceType != DIRECT_ACCESS_DEVICE) ? ((UFIInquiryResponse->RMB & 0x80) ? 1 : 0) : 0); ScsiInquiryData->Versions = 0x04; ScsiInquiryData->ResponseDataFormat = 0x02;