mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 00:24:07 +02:00
According to SCSI spec, ANSI version is 3 bits, so 0x7 should be used to get correct ANSI version.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10773 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
baa9a78242
commit
379f83dff0
@ -1210,7 +1210,7 @@ DiscoverScsiDevice (
|
|||||||
//
|
//
|
||||||
// ANSI-approved version
|
// ANSI-approved version
|
||||||
//
|
//
|
||||||
ScsiIoDevice->ScsiVersion = (UINT8) (InquiryData.Version & 0x03);
|
ScsiIoDevice->ScsiVersion = (UINT8) (InquiryData.Version & 0x07);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1195,7 +1195,7 @@ ScsiDiskReadCapacity (
|
|||||||
|
|
||||||
*NumberOfSenseKeys = 0;
|
*NumberOfSenseKeys = 0;
|
||||||
*NeedRetry = FALSE;
|
*NeedRetry = FALSE;
|
||||||
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x03);
|
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x07);
|
||||||
|
|
||||||
if (ScsiVersion < SCSI_COMMAND_VERSION_3) {
|
if (ScsiVersion < SCSI_COMMAND_VERSION_3) {
|
||||||
//
|
//
|
||||||
@ -1505,7 +1505,7 @@ GetMediaInfo (
|
|||||||
UINT8 ScsiVersion;
|
UINT8 ScsiVersion;
|
||||||
UINT8 *Ptr;
|
UINT8 *Ptr;
|
||||||
|
|
||||||
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x03);
|
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x07);
|
||||||
ScsiDiskDevice->BlkIo.Media->LowestAlignedLba = 0;
|
ScsiDiskDevice->BlkIo.Media->LowestAlignedLba = 0;
|
||||||
ScsiDiskDevice->BlkIo.Media->LogicalBlocksPerPhysicalBlock = 1;
|
ScsiDiskDevice->BlkIo.Media->LogicalBlocksPerPhysicalBlock = 1;
|
||||||
|
|
||||||
@ -1612,7 +1612,7 @@ ScsiDiskReadSectors (
|
|||||||
|
|
||||||
BlocksRemaining = NumberOfBlocks;
|
BlocksRemaining = NumberOfBlocks;
|
||||||
BlockSize = ScsiDiskDevice->BlkIo.Media->BlockSize;
|
BlockSize = ScsiDiskDevice->BlkIo.Media->BlockSize;
|
||||||
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x03);
|
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x07);
|
||||||
|
|
||||||
//
|
//
|
||||||
// limit the data bytes that can be transferred by one Read(10) or Read(16) Command
|
// limit the data bytes that can be transferred by one Read(10) or Read(16) Command
|
||||||
@ -1736,7 +1736,7 @@ ScsiDiskWriteSectors (
|
|||||||
|
|
||||||
BlocksRemaining = NumberOfBlocks;
|
BlocksRemaining = NumberOfBlocks;
|
||||||
BlockSize = ScsiDiskDevice->BlkIo.Media->BlockSize;
|
BlockSize = ScsiDiskDevice->BlkIo.Media->BlockSize;
|
||||||
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x03);
|
ScsiVersion = (UINT8)(ScsiDiskDevice->InquiryData.Version & 0x07);
|
||||||
|
|
||||||
//
|
//
|
||||||
// limit the data bytes that can be transferred by one Read(10) or Read(16) Command
|
// limit the data bytes that can be transferred by one Read(10) or Read(16) Command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user