diff options
Diffstat (limited to 'EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c')
-rw-r--r-- | EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c index a54acf6994..93f7081516 100644 --- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c +++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/atapi.c @@ -714,11 +714,6 @@ PioReadWriteData ( UINT16 *PtrBuffer;
//
- // containing status byte read from Status Register.
- //
- UINT8 StatusRegister;
-
- //
// No data transfer is premitted.
//
if (ByteCount == 0) {
@@ -750,16 +745,14 @@ PioReadWriteData ( //
// read Status Register will clear interrupt
//
- StatusRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
+ IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg.Status);
//
// get current data transfer size from Cylinder Registers.
//
- WordCount =
- (
- (IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8) |
- IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb)
- ) & 0xffff;
+ WordCount = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderMsb) << 8;
+ WordCount = WordCount | IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->CylinderLsb);
+ WordCount = WordCount & 0xffff;
WordCount /= 2;
WordCount = EFI_MIN (WordCount, (RequiredWordCount - ActualWordCount));
|