/* The IDE controller driver for a Serial ATA (SATA) controller can use this member function to force a lower speed (first-generation  speeds on a second-generation -capable hardware). The IDE controller driver can also allow the driver entity to stay with the speed that has been negotiated by the physical layer. */
EFI_STATUS EFIAPI IdeInitCalculateMode(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes)
/* The IDE controller driver for a Serial ATA (SATA) controller can use this member function to force a lower speed (first-generation  speeds on a second-generation -capable hardware). The IDE controller driver can also allow the driver entity to stay with the speed that has been negotiated by the physical layer. */
EFI_STATUS EFIAPI IdeInitCalculateMode(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes)
{
  if ((Channel >= ICH_IDE_MAX_CHANNEL) || (Device >= ICH_IDE_MAX_DEVICES)) {
    return EFI_INVALID_PARAMETER;
  }
  *SupportedModes = AllocateCopyPool (sizeof (EFI_ATA_COLLECTIVE_MODE), &gEfiAtaCollectiveModeTemplate);
  if (*SupportedModes == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  return EFI_SUCCESS;
}