X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FAtapiPassThruDxe%2FAtapiPassThru.c;h=43b18113d255ed236c0a931eaa2ade274cd03789;hp=ac12be4ee048aed5d5406620043e568f782d2a3c;hb=3276b5739a7776256635aa19099a101c79d3549f;hpb=6a6d955c5f670141344c614c65dbea332f393b57 diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c index ac12be4ee0..43b18113d2 100644 --- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c +++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c @@ -13,12 +13,12 @@ #include "AtapiPassThru.h" -static SCSI_COMMAND_SET gEndTable = { 0xff, (DATA_DIRECTION) 0xff }; +SCSI_COMMAND_SET gEndTable = { 0xff, (DATA_DIRECTION) 0xff }; /// /// This table contains all the supported ATAPI commands. /// -static SCSI_COMMAND_SET gSupportedATAPICommands[] = { +SCSI_COMMAND_SET gSupportedATAPICommands[] = { { OP_INQUIRY, DataIn }, { OP_LOAD_UNLOAD_CD, NoData }, { OP_MECHANISM_STATUS, DataIn }, @@ -163,7 +163,7 @@ Returns: return EFI_UNSUPPORTED; } - if (Pci.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE || Pci.Hdr.ClassCode[1] != PCI_CLASS_IDE) { + if (Pci.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE || Pci.Hdr.ClassCode[1] != PCI_CLASS_MASS_STORAGE_IDE) { Status = EFI_UNSUPPORTED; } @@ -822,7 +822,7 @@ Returns: // // disable Interrupt // - DeviceControlValue |= bit (1); + DeviceControlValue |= BIT1; WritePortB ( AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->Alt.DeviceControl, @@ -922,7 +922,7 @@ Returns: // // bit7 and bit5 are both set to 1 for backward compatibility // - DeviceSelect = (UINT8) (((bit (7) | bit (5)) | (Target << 4))); + DeviceSelect = (UINT8) (((BIT7 | BIT5) | (Target << 4))); WritePortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->Head, DeviceSelect); Command = ATAPI_SOFT_RESET_CMD; @@ -1336,7 +1336,7 @@ Returns: // // disable Interrupt // - DeviceControlValue |= bit (1); + DeviceControlValue |= BIT1; WritePortB ( AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->Alt.DeviceControl, @@ -1438,7 +1438,7 @@ Returns: // // bit7 and bit5 are both set to 1 for backward compatibility // - DeviceSelect = (UINT8) (((bit (7) | bit (5)) | (TargetId << 4))); + DeviceSelect = (UINT8) ((BIT7 | BIT5) | (TargetId << 4)); WritePortB (AtapiScsiPrivate->PciIo, AtapiScsiPrivate->IoPort->Head, DeviceSelect); Command = ATAPI_SOFT_RESET_CMD;