audk/MdePkg
Laszlo Ersek b04a63ac48 MdePkg: UefiScsiLib: do not encode LUN in CDB for other SCSI commands
The TEST UNIT READY, INQUIRY, MODE SENSE, REQUEST SENSE and READ CAPACITY
commands define bits [7:5] of Cdb[1] as Reserved (potentially as part of a
larger Reserved bitfield):

  Command             Reserved bitfield in Cdb[1]  SCSI spec reference
  ------------------  ---------------------------  -------------------
  TEST UNIT READY     all bits                     SPC-4 6.37
  INQUIRY             bits [7:2]                   SPC-4 6.4.1
  MODE SENSE (6)      bits [7:4]                   SPC-4 6.11.1
  MODE SENSE (10)     bits [7:5]                   SPC-4 6.12
  REQUEST SENSE       bits [7:1]                   SPC-4 6.29
  READ CAPACITY (10)  bits [7:1]                   SBC-3 5.16
  READ CAPACITY (16)  bits [7:5]                   SBC-3 5.17

Update the UefiScsiLib functions accordingly.

(In ScsiReadCapacity16Command() the LUN has not been encoded, so there we
just remove the useless ScsiIo->GetDeviceLocation() call, with its
auxiliary local variables.)

The EFI_SCSI_TARGET_MAX_BYTES and EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK macros
become unused with this patch, remove them too.

Suggested-by: Feng Tian <feng.tian@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16455 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-28 10:24:56 +00:00
..
Include Added PlatformNotification to ACPI 5.0 PCCT structure. 2014-11-27 02:17:28 +00:00
Library MdePkg: UefiScsiLib: do not encode LUN in CDB for other SCSI commands 2014-11-28 10:24:56 +00:00
Contributions.txt EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdePkg.dec UEFI 2.4 X509 Certificate Hash and RFC3161 Timestamp Verification support for Secure Boot 2014-11-14 08:41:12 +00:00
MdePkg.dsc Update MdePkg package version from 1.04 to 1.05 2014-09-02 05:10:46 +00:00
MdePkg.uni MdePkg: Convert non DOS format files to DOS format 2014-09-03 08:33:28 +00:00
MdePkgExtra.uni MdePkg: INF/DEC file updates to EDK II packages 2014-08-27 09:39:59 +00:00