]> git.proxmox.com Git - mirror_edk2.git/commit
Fix a bug in the SCSI Bus driver due to which some SCSI devices can not be discovered...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 May 2009 05:38:40 +0000 (05:38 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 May 2009 05:38:40 +0000 (05:38 +0000)
commitd1a8a1dc998e1636e6155822426973ba3f43742b
tree716d15f23281632eb16e78fe4d82d5fa85efbd1e
parent78709ef8cf13fe387a5b72cab34de195e6438070
Fix a bug in the SCSI Bus driver due to which some SCSI devices can not be discovered. Per SCSI spec, the standard INQUIRY data shall contain at least 36 bytes and the length of the data is variable. The definition
///
/// Standard INQUIRY data format
///
typedef struct {
  UINT8 Peripheral_Type : 5;
  UINT8 Peripheral_Qualifier : 3;
  UINT8 DeviceType_Modifier : 7;
  UINT8 Rmb : 1;
  UINT8 Version;
  UINT8 Response_Data_Format;
  UINT8 Addnl_Length;
  UINT8 Reserved_5_95[95 - 5 + 1];
} EFI_SCSI_INQUIRY_DATA;

is longer than 36 bytes and EFI_BAD_BUFFER_SIZE may be returned if the actual inquiry data is less than that of EFI_SCSI_INQUIRY_DATA.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8329 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c