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
This commit is contained in:
rsun3 2009-05-19 05:38:40 +00:00
parent 78709ef8cf
commit d1a8a1dc99
1 changed files with 1 additions and 1 deletions

View File

@ -1123,7 +1123,7 @@ DiscoverScsiDevice (
&InquiryDataLength,
FALSE
);
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) && Status != EFI_BAD_BUFFER_SIZE) {
return FALSE;
}
//