X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FAta%2FAtaBusDxe%2FAtaPassThruExecute.c;fp=MdeModulePkg%2FBus%2FAta%2FAtaBusDxe%2FAtaPassThruExecute.c;h=35a1b47e8a36b63f9bf6c4017227a3ccf17d8aef;hb=4c33f8b190a439bb931a92eb63eb3cc1806c7ccc;hp=a3739fc80b5e51d40c435a1a7297bd8b882c3871;hpb=bd907fb6386560e621112beca7b7d381d0003967;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index a3739fc80b..35a1b47e8a 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c @@ -10,7 +10,7 @@ for Security Protocol Specific layout. This implementation uses big endian for Cylinder register. - Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -495,7 +495,7 @@ TransferAtaDevice ( Acb->AtaSectorNumber = (UINT8) StartLba; Acb->AtaCylinderLow = (UINT8) RShiftU64 (StartLba, 8); Acb->AtaCylinderHigh = (UINT8) RShiftU64 (StartLba, 16); - Acb->AtaDeviceHead = (UINT8) (BIT7 | BIT6 | BIT5 | (AtaDevice->PortMultiplierPort << 4)); + Acb->AtaDeviceHead = (UINT8) (BIT7 | BIT6 | BIT5 | (AtaDevice->PortMultiplierPort == 0xFFFF ? 0 : (AtaDevice->PortMultiplierPort << 4))); Acb->AtaSectorCount = (UINT8) TransferLength; if (AtaDevice->Lba48Bit) { Acb->AtaSectorNumberExp = (UINT8) RShiftU64 (StartLba, 24); @@ -1027,7 +1027,7 @@ TrustTransferAtaDevice ( // Acb->AtaCylinderHigh = (UINT8) SecurityProtocolSpecificData; Acb->AtaCylinderLow = (UINT8) (SecurityProtocolSpecificData >> 8); - Acb->AtaDeviceHead = (UINT8) (BIT7 | BIT6 | BIT5 | (AtaDevice->PortMultiplierPort << 4)); + Acb->AtaDeviceHead = (UINT8) (BIT7 | BIT6 | BIT5 | (AtaDevice->PortMultiplierPort == 0xFFFF ? 0 : (AtaDevice->PortMultiplierPort << 4))); // // Prepare for ATA pass through packet.