MdeModulePkg: Fix a bug in GetNextTargetLun()/GetNextTarget() when two cdroms attached

Signed-off-by: erictian
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12890 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
erictian 2011-12-21 06:04:56 +00:00
parent fe28761275
commit d8982b0303
1 changed files with 4 additions and 2 deletions

View File

@ -2028,7 +2028,8 @@ ExtScsiPassThruGetNextTargetLun (
if ((DeviceInfo->Type == EfiIdeCdrom) &&
((Target8[0] < DeviceInfo->Port) ||
(Target8[1] < DeviceInfo->PortMultiplier))) {
((Target8[0] == DeviceInfo->Port) &&
(Target8[1] < DeviceInfo->PortMultiplier)))) {
Target8[0] = (UINT8)DeviceInfo->Port;
Target8[1] = (UINT8)DeviceInfo->PortMultiplier;
goto Exit;
@ -2366,7 +2367,8 @@ ExtScsiPassThruGetNextTarget (
if ((DeviceInfo->Type == EfiIdeCdrom) &&
((Target8[0] < DeviceInfo->Port) ||
(Target8[1] < DeviceInfo->PortMultiplier))) {
((Target8[0] == DeviceInfo->Port) &&
(Target8[1] < DeviceInfo->PortMultiplier)))) {
Target8[0] = (UINT8)DeviceInfo->Port;
Target8[1] = (UINT8)DeviceInfo->PortMultiplier;
goto Exit;