Function AtaEnableLongPhysicalSector () added for Long physical sector process.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8004 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy
2009-04-02 01:50:07 +00:00
parent ef1ad620f0
commit 75eccf9d4a
3 changed files with 87 additions and 1 deletions

View File

@@ -421,6 +421,7 @@ DiscoverIdeDevice (
// TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_STATUS LongPhyStatus;
//
// If a channel has not been checked, check it now. Then set it to "checked" state
@@ -485,7 +486,12 @@ DiscoverIdeDevice (
//
// Init Block I/O interface
//
IdeDev->BlkIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION;
LongPhyStatus = AtaEnableLongPhysicalSector (IdeDev);
if (!EFI_ERROR (LongPhyStatus)) {
IdeDev->BlkIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2;
} else {
IdeDev->BlkIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION;
}
IdeDev->BlkIo.Reset = IDEBlkIoReset;
IdeDev->BlkIo.ReadBlocks = IDEBlkIoReadBlocks;
IdeDev->BlkIo.WriteBlocks = IDEBlkIoWriteBlocks;