Drivers/SataSiI3132Dxe: Fixed PCI IO read and write operations

The ATA pass through read should use PCI IO bus master write operation
and ATA pass through write should use PCI IO bus master read operation
as the read and write operations are executed from the bus master's
point of view.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
Daniil Egranov 2017-10-27 00:33:23 -05:00 committed by Ard Biesheuvel
parent 8512fc5731
commit 050d513bac
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ SiI3132AtaPassThruCommand (
}
Status = PciIo->Map (
PciIo, EfiPciIoOperationBusMasterRead,
PciIo, EfiPciIoOperationBusMasterWrite,
Packet->InDataBuffer, &InDataBufferLength, &PhysInDataBuffer, &PciAllocMapping
);
if (EFI_ERROR (Status)) {
@ -139,7 +139,7 @@ SiI3132AtaPassThruCommand (
OutDataBufferLength = Packet->OutTransferLength * SataDevice->BlockSize;
Status = PciIo->Map (
PciIo, EfiPciIoOperationBusMasterWrite,
PciIo, EfiPciIoOperationBusMasterRead,
Packet->OutDataBuffer, &OutDataBufferLength, &PhysOutDataBuffer, &PciAllocMapping
);
if (EFI_ERROR (Status)) {