From 90e94e42c5870df383e5df501a23575a8ebdd1ef Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 29 Feb 2012 04:58:27 +0000 Subject: [PATCH] [USBUHCI][USBOHCI][USBEHCI] - Don't modify PCI configuration in AddDevice function [USBEHCI] - Don't halt the controller while the BIOS still has control of it svn path=/trunk/; revision=55910 --- reactos/drivers/usb/usbehci/hardware.cpp | 7 ------ reactos/drivers/usb/usbohci/hardware.cpp | 32 ------------------------ reactos/drivers/usb/usbuhci/hardware.cpp | 5 ---- 3 files changed, 44 deletions(-) diff --git a/reactos/drivers/usb/usbehci/hardware.cpp b/reactos/drivers/usb/usbehci/hardware.cpp index c952b6f8cc6..e43b2e14367 100644 --- a/reactos/drivers/usb/usbehci/hardware.cpp +++ b/reactos/drivers/usb/usbehci/hardware.cpp @@ -466,13 +466,6 @@ CUSBHardwareDevice::PnpStart( return STATUS_INSUFFICIENT_RESOURCES; } - // - // Stop the controller before modifying schedules - // - Status = StopController(); - if (!NT_SUCCESS(Status)) - return Status; - // // Initialize the DMAMemoryManager // diff --git a/reactos/drivers/usb/usbohci/hardware.cpp b/reactos/drivers/usb/usbohci/hardware.cpp index 88eed5d6d9f..96c78ebb231 100644 --- a/reactos/drivers/usb/usbohci/hardware.cpp +++ b/reactos/drivers/usb/usbohci/hardware.cpp @@ -201,38 +201,6 @@ CUSBHardwareDevice::Initialize( m_VendorID = PciConfig.VendorID; m_DeviceID = PciConfig.DeviceID; - if (PciConfig.Command & PCI_ENABLE_BUS_MASTER) - { - // - // master is enabled - // - return STATUS_SUCCESS; - } - - DPRINT1("PCI Configuration shows this as a non Bus Mastering device! Enabling...\n"); - - PciConfig.Command |= PCI_ENABLE_BUS_MASTER; - BusInterface.SetBusData(BusInterface.Context, PCI_WHICHSPACE_CONFIG, &PciConfig, 0, PCI_COMMON_HDR_LENGTH); - - BytesRead = (*BusInterface.GetBusData)(BusInterface.Context, - PCI_WHICHSPACE_CONFIG, - &PciConfig, - 0, - PCI_COMMON_HDR_LENGTH); - - if (BytesRead != PCI_COMMON_HDR_LENGTH) - { - DPRINT1("Failed to get pci config information!\n"); - ASSERT(FALSE); - return STATUS_SUCCESS; - } - - if (!(PciConfig.Command & PCI_ENABLE_BUS_MASTER)) - { - DPRINT1("Failed to enable master\n"); - return STATUS_UNSUCCESSFUL; - } - return STATUS_SUCCESS; } diff --git a/reactos/drivers/usb/usbuhci/hardware.cpp b/reactos/drivers/usb/usbuhci/hardware.cpp index d5e3489df1e..daa4eb29144 100644 --- a/reactos/drivers/usb/usbuhci/hardware.cpp +++ b/reactos/drivers/usb/usbuhci/hardware.cpp @@ -227,11 +227,6 @@ CUSBHardwareDevice::Initialize( return STATUS_SUCCESS; } - if (!(PciConfig.Command & PCI_ENABLE_BUS_MASTER)) - { - DPRINT1("PCI Configuration shows this as a non Bus Mastering device!\n"); - } - m_VendorID = PciConfig.VendorID; m_DeviceID = PciConfig.DeviceID;