Hi, Reza Do you see any impact with original code? Why we don't use IdeInit.GetChannelInfo() is because we can get the info by AHCI PI register.
Thanks Feng -----Original Message----- From: reza.jel...@tuhh.de [mailto:reza.jel...@tuhh.de] Sent: Friday, August 15, 2014 08:20 To: edk2-devel@lists.sourceforge.net Cc: ag...@suse.de Subject: [edk2] [PATCH 6/6] MdeModulePkg: AhciMode calls GetChannelInfo when enumerating From: Reza Jelveh <reza.jel...@tuhh.de> GetChannelInfo is called to initialize the SataController when enumerating ports. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Reza Jelveh <reza.jel...@tuhh.de> --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c index 487f516..92af9e4 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -2211,6 +2211,7 @@ AhciModeInitialization ( EFI_PCI_IO_PROTOCOL *PciIo; EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeInit; UINT32 Capability; + BOOLEAN ChannelEnabled; UINT8 MaxPortNumber; UINT32 PortImplementBitMap; @@ -2282,6 +2283,21 @@ AhciModeInitialization ( IdeInit->NotifyPhase (IdeInit, EfiIdeBeforeChannelEnumeration, Port); + Status = IdeInit->GetChannelInfo ( + IdeInit, + Port, + &ChannelEnabled, + &MaxPortNumber + ); + if (EFI_ERROR (Status)) { + DEBUG ((EFI_D_ERROR, "[GetChannel, Status=%x]", Status)); + continue; + } + + if (!ChannelEnabled) { + continue; + } + // // Initialize FIS Base Address Register and Command List Base Address Register for use. // -- 1.9.2 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel