diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-19 05:38:40 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-19 05:38:40 +0000 |
commit | d1a8a1dc998e1636e6155822426973ba3f43742b (patch) | |
tree | 716d15f23281632eb16e78fe4d82d5fa85efbd1e /MdeModulePkg | |
parent | 78709ef8cf13fe387a5b72cab34de195e6438070 (diff) | |
download | edk2-d1a8a1dc998e1636e6155822426973ba3f43742b.tar.gz edk2-d1a8a1dc998e1636e6155822426973ba3f43742b.tar.bz2 edk2-d1a8a1dc998e1636e6155822426973ba3f43742b.zip |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 4d8eff6eee..2a765460b2 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -1123,7 +1123,7 @@ DiscoverScsiDevice ( &InquiryDataLength,
FALSE
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) && Status != EFI_BAD_BUFFER_SIZE) {
return FALSE;
}
//
|