[USBEHCI]

- Enable device as pci bus master
- Fixes hanging of Vmware USB EHCI controller
- Revert changes from 55293 from usb_queue
- Currently crashes when usbstor wants to receive descriptors

svn path=/branches/usb-bringup-trunk/; revision=55294
This commit is contained in:
Johannes Anderwald 2012-01-29 20:34:46 +00:00
parent 2b13dd5132
commit a4c2608e34
3 changed files with 34 additions and 8 deletions

View file

@ -226,14 +226,42 @@ CUSBHardwareDevice::Initialize(
return STATUS_SUCCESS; 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_VendorID = PciConfig.VendorID;
m_DeviceID = PciConfig.DeviceID; 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))
{
PciConfig.Command |= PCI_ENABLE_BUS_MASTER;
DPRINT1("Failed to enable master\n");
return STATUS_UNSUCCESSFUL;
}
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }

View file

@ -368,8 +368,6 @@ CUSBQueue::AddUSBRequest(
m_Hardware->GetCommandRegister(&UsbCmd); m_Hardware->GetCommandRegister(&UsbCmd);
ASSERT(UsbCmd.AsyncEnable == TRUE); ASSERT(UsbCmd.AsyncEnable == TRUE);
m_Hardware->SetAsyncListRegister(QueueHead->PhysicalAddr);
} }

View file

@ -2,7 +2,7 @@
#define USBEHCI_H__ #define USBEHCI_H__
#include <ntddk.h> #include <ntddk.h>
#define NDEBUG #define YDEBUG
#include <debug.h> #include <debug.h>
#include <hubbusif.h> #include <hubbusif.h>
#include <usbbusif.h> #include <usbbusif.h>