mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
[USBSTOR]
- In USBSTOR_GetMaxLUN, correctly handle devices that do not support this request. Patch by Vadim Galyant. CORE-10515 #resolve svn path=/trunk/; revision=71128
This commit is contained in:
parent
ce2ec6562e
commit
372ab04bc4
1 changed files with 23 additions and 8 deletions
|
@ -362,6 +362,8 @@ USBSTOR_GetMaxLUN(
|
||||||
|
|
||||||
DPRINT("MaxLUN: %x\n", *Buffer);
|
DPRINT("MaxLUN: %x\n", *Buffer);
|
||||||
|
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
if (*Buffer > 0xF)
|
if (*Buffer > 0xF)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -376,6 +378,19 @@ USBSTOR_GetMaxLUN(
|
||||||
//
|
//
|
||||||
DeviceExtension->MaxLUN = *Buffer;
|
DeviceExtension->MaxLUN = *Buffer;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// "USB Mass Storage Class. Bulk-Only Transport. Revision 1.0"
|
||||||
|
// 3.2 Get Max LUN (class-specific request) :
|
||||||
|
// Devices that do not support multiple LUNs may STALL this command.
|
||||||
|
//
|
||||||
|
USBSTOR_ResetDevice(DeviceExtension->LowerDeviceObject, DeviceExtension);
|
||||||
|
|
||||||
|
DeviceExtension->MaxLUN = 0;
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// free buffer
|
// free buffer
|
||||||
|
|
Loading…
Reference in a new issue