diff options
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c | 24 |
2 files changed, 18 insertions, 11 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 843815d0cb..14bed54729 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1407,6 +1407,7 @@ SupportPaletteSnoopAttributes ( IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation
)
{
+ EFI_STATUS Status;
PCI_IO_DEVICE *Temp;
UINT16 VGACommand;
@@ -1444,13 +1445,13 @@ SupportPaletteSnoopAttributes ( // Check if they are on the same bus
//
if (Temp->Parent == PciIoDevice->Parent) {
- PCI_READ_COMMAND_REGISTER (Temp, &VGACommand);
+ Status = PCI_READ_COMMAND_REGISTER (Temp, &VGACommand);
//
// If they are on the same bus, either one can
// be set to snoop, the other set to decode
//
- if ((VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {
+ if (!EFI_ERROR (Status) && ((VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0)) {
//
// VGA has set to snoop, so GFX can be only set to disable snoop
//
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c index 48741085e5..496ffbd5c4 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c @@ -730,10 +730,12 @@ Uhci2ControlTransfer ( Uhc->PciIo->Flush (Uhc->PciIo);
- *TransferResult = QhResult.Result;
+ if (!EFI_ERROR (Status)) {
+ *TransferResult = QhResult.Result;
- if (DataLength != NULL) {
- *DataLength = QhResult.Complete;
+ if (DataLength != NULL) {
+ *DataLength = QhResult.Complete;
+ }
}
UhciDestoryTds (Uhc, TDs);
@@ -884,9 +886,11 @@ Uhci2BulkTransfer ( Uhc->PciIo->Flush (Uhc->PciIo);
- *TransferResult = QhResult.Result;
- *DataToggle = QhResult.NextToggle;
- *DataLength = QhResult.Complete;
+ if (!EFI_ERROR (Status)) {
+ *TransferResult = QhResult.Result;
+ *DataToggle = QhResult.NextToggle;
+ *DataLength = QhResult.Complete;
+ }
UhciDestoryTds (Uhc, TDs);
Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
@@ -1210,9 +1214,11 @@ Uhci2SyncInterruptTransfer ( UhciUnlinkTdFromQh (Uhc->SyncIntQh, TDs);
Uhc->PciIo->Flush (Uhc->PciIo);
- *TransferResult = QhResult.Result;
- *DataToggle = QhResult.NextToggle;
- *DataLength = QhResult.Complete;
+ if (!EFI_ERROR (Status)) {
+ *TransferResult = QhResult.Result;
+ *DataToggle = QhResult.NextToggle;
+ *DataLength = QhResult.Complete;
+ }
UhciDestoryTds (Uhc, TDs);
Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
|