X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FBus%2FPci%2FIdeBus%2FDxe%2Fidebus.c;h=0e7d43eeb9a0475e0b2d3e603a3bb96809895217;hp=3b0e69e929162aa2437219afa859a931055ede6f;hb=0b293ccb7e678b37d19e00618c79f313fe211a84;hpb=715a44f11b0af748a1febc2c2cf4c7d955403b3e diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c index 3b0e69e929..0e7d43eeb9 100644 --- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c +++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c @@ -26,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = { IDEBusDriverBindingSupported, IDEBusDriverBindingStart, IDEBusDriverBindingStop, - 0x10, + 0xa, NULL, NULL }; @@ -91,7 +91,7 @@ IDEBusDriverBindingSupported ( } // - // Clsoe protocol, don't use device path protocol in the .Support() function + // Close protocol, don't use device path protocol in the .Support() function // gBS->CloseProtocol ( Controller, @@ -189,7 +189,6 @@ IDEBusDriverBindingStart ( EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit; BOOLEAN EnumAll; BOOLEAN ChannelEnabled; - UINT8 ChannelCount; UINT8 MaxDevices; EFI_IDENTIFY_DATA IdentifyData; EFI_ATA_COLLECTIVE_MODE *SupportedModes; @@ -239,10 +238,9 @@ IDEBusDriverBindingStart ( } // - // Save Enumall and ChannelCount. Step7.2 + // Save Enumall. Step7.2 // EnumAll = IdeInit->EnumAll; - ChannelCount = IdeInit->ChannelCount; // // Consume PCI I/O protocol. Note that the OpenProtocol with _GET_PROTOCOL @@ -453,8 +451,8 @@ IDEBusDriverBindingStart ( ZeroMem (IdeBlkIoDevicePtr, sizeof (IDE_BLK_IO_DEV)); IdeBlkIoDevicePtr->Signature = IDE_BLK_IO_DEV_SIGNATURE; - IdeBlkIoDevicePtr->Channel = IdeChannel; - IdeBlkIoDevicePtr->Device = IdeDevice; + IdeBlkIoDevicePtr->Channel = (EFI_IDE_CHANNEL) IdeChannel; + IdeBlkIoDevicePtr->Device = (EFI_IDE_DEVICE) IdeDevice; // // initialize Block IO interface's Media pointer @@ -666,7 +664,7 @@ IDEBusDriverBindingStart ( // // Record PIO mode used in private data // - IdeBlkIoDevicePtr->PioMode = SupportedModes->PioMode.Mode; + IdeBlkIoDevicePtr->PioMode = (ATA_PIO_MODE) SupportedModes->PioMode.Mode; // // Set IDE controller Timing Blocks in the PCI Configuration Space