Author: janderwald
Date: Wed Feb 29 09:41:34 2012
New Revision: 55916
URL:
http://svn.reactos.org/svn/reactos?rev=55916&view=rev
Log:
[USBEHCI]
- Fix regressions caused by libusb
Modified:
trunk/reactos/drivers/usb/usbehci/hardware.cpp
trunk/reactos/drivers/usb/usbehci/usb_queue.cpp
trunk/reactos/drivers/usb/usbehci/usb_request.cpp
trunk/reactos/drivers/usb/usbehci/usbehci.h
Modified: trunk/reactos/drivers/usb/usbehci/hardware.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/hardwa…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/hardware.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/hardware.cpp [iso-8859-1] Wed Feb 29 09:41:34 2012
@@ -32,7 +32,7 @@
NTAPI
StatusChangeWorkItemRoutine(PVOID Context);
-class CUSBHardwareDevice : public IUSBHardwareDevice
+class CUSBHardwareDevice : public IEHCIHardwareDevice
{
public:
STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface);
@@ -127,6 +127,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::Initialize(
PDRIVER_OBJECT DriverObject,
PDEVICE_OBJECT FunctionalDeviceObject,
@@ -206,6 +207,7 @@
}
VOID
+STDMETHODCALLTYPE
CUSBHardwareDevice::SetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd)
{
PULONG Register;
@@ -214,6 +216,7 @@
}
VOID
+STDMETHODCALLTYPE
CUSBHardwareDevice::GetCommandRegister(PEHCI_USBCMD_CONTENT UsbCmd)
{
PULONG Register;
@@ -277,6 +280,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::PnpStart(
PCM_RESOURCE_LIST RawResources,
PCM_RESOURCE_LIST TranslatedResources)
@@ -483,6 +487,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::PnpStop(void)
{
UNIMPLEMENTED
@@ -490,6 +495,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::GetDeviceDetails(
OUT OPTIONAL PUSHORT VendorId,
OUT OPTIONAL PUSHORT DeviceId,
@@ -508,7 +514,9 @@
return STATUS_SUCCESS;
}
-NTSTATUS CUSBHardwareDevice::GetDMA(
+NTSTATUS
+STDMETHODCALLTYPE
+CUSBHardwareDevice::GetDMA(
OUT struct IDMAMemoryManager **OutDMAMemoryManager)
{
if (!m_MemoryManager)
@@ -518,6 +526,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::GetUSBQueue(
OUT struct IUSBQueue **OutUsbQueue)
{
@@ -872,6 +881,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::ResetPort(
IN ULONG PortIndex)
{
@@ -913,6 +923,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::GetPortStatus(
ULONG PortId,
OUT USHORT *PortStatus,
@@ -987,6 +998,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::ClearPortStatus(
ULONG PortId,
ULONG Status)
@@ -1096,6 +1108,7 @@
NTSTATUS
+STDMETHODCALLTYPE
CUSBHardwareDevice::SetPortFeature(
ULONG PortId,
ULONG Feature)
@@ -1170,6 +1183,7 @@
}
VOID
+STDMETHODCALLTYPE
CUSBHardwareDevice::SetAsyncListRegister(
ULONG PhysicalAddress)
{
@@ -1177,6 +1191,7 @@
}
VOID
+STDMETHODCALLTYPE
CUSBHardwareDevice::SetPeriodicListRegister(
ULONG PhysicalAddress)
{
@@ -1187,18 +1202,23 @@
}
struct _QUEUE_HEAD *
+STDMETHODCALLTYPE
CUSBHardwareDevice::GetAsyncListQueueHead()
{
return AsyncQueueHead;
}
-ULONG CUSBHardwareDevice::GetPeriodicListRegister()
+ULONG
+STDMETHODCALLTYPE
+CUSBHardwareDevice::GetPeriodicListRegister()
{
UNIMPLEMENTED
return NULL;
}
-VOID CUSBHardwareDevice::SetStatusChangeEndpointCallBack(
+VOID
+STDMETHODCALLTYPE
+CUSBHardwareDevice::SetStatusChangeEndpointCallBack(
PVOID CallBack,
PVOID Context)
{
@@ -1437,6 +1457,7 @@
}
NTSTATUS
+NTAPI
CreateUSBHardware(
PUSBHARDWAREDEVICE *OutHardware)
{
Modified: trunk/reactos/drivers/usb/usbehci/usb_queue.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usb_qu…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/usb_queue.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/usb_queue.cpp [iso-8859-1] Wed Feb 29 09:41:34 2012
@@ -96,6 +96,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBQueue::Initialize(
IN PUSBHARDWAREDEVICE Hardware,
IN PDMA_ADAPTER AdapterObject,
@@ -276,6 +277,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBQueue::AddUSBRequest(
IUSBRequest * Req)
{
@@ -367,6 +369,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBQueue::CreateUSBRequest(
IUSBRequest **OutRequest)
{
@@ -657,6 +660,7 @@
VOID
+STDMETHODCALLTYPE
CUSBQueue::InterruptCallback(
IN NTSTATUS Status,
OUT PULONG ShouldRingDoorBell)
@@ -826,6 +830,7 @@
}
VOID
+STDMETHODCALLTYPE
CUSBQueue::CompleteAsyncRequests()
{
KIRQL OldLevel;
@@ -900,6 +905,7 @@
}
NTSTATUS
+STDMETHODCALLTYPE
CUSBQueue::AbortDevicePipe(
IN UCHAR DeviceAddress,
IN PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor)
@@ -984,6 +990,7 @@
NTSTATUS
+NTAPI
CreateUSBQueue(
PUSBQUEUE *OutUsbQueue)
{
Modified: trunk/reactos/drivers/usb/usbehci/usb_request.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usb_re…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] Wed Feb 29 09:41:34
2012
@@ -145,6 +145,7 @@
//----------------------------------------------------------------------------------------
NTSTATUS
+STDMETHODCALLTYPE
CUSBRequest::InitializeWithSetupPacket(
IN PDMAMEMORYMANAGER DmaManager,
IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket,
@@ -199,6 +200,7 @@
}
//----------------------------------------------------------------------------------------
NTSTATUS
+STDMETHODCALLTYPE
CUSBRequest::InitializeWithIrp(
IN PDMAMEMORYMANAGER DmaManager,
IN PUSBDEVICE Device,
@@ -330,6 +332,7 @@
//----------------------------------------------------------------------------------------
VOID
+STDMETHODCALLTYPE
CUSBRequest::CompletionCallback(
IN NTSTATUS NtStatusCode,
IN ULONG UrbStatusCode,
@@ -419,6 +422,7 @@
//----------------------------------------------------------------------------------------
NTSTATUS
+STDMETHODCALLTYPE
CUSBRequest::GetQueueHead(
struct _QUEUE_HEAD ** OutHead)
{
@@ -476,6 +480,7 @@
//----------------------------------------------------------------------------------------
BOOLEAN
+STDMETHODCALLTYPE
CUSBRequest::IsRequestComplete()
{
//
@@ -497,6 +502,7 @@
}
//----------------------------------------------------------------------------------------
ULONG
+STDMETHODCALLTYPE
CUSBRequest::GetTransferType()
{
//
@@ -1283,6 +1289,7 @@
//----------------------------------------------------------------------------------------
UCHAR
+STDMETHODCALLTYPE
CUSBRequest::GetDeviceAddress()
{
PIO_STACK_LOCATION IoStack;
@@ -1523,6 +1530,7 @@
//----------------------------------------------------------------------------------------
VOID
+STDMETHODCALLTYPE
CUSBRequest::GetResultStatus(
OUT OPTIONAL NTSTATUS * NtStatusCode,
OUT OPTIONAL PULONG UrbStatusCode)
@@ -1557,6 +1565,7 @@
//-----------------------------------------------------------------------------------------
BOOLEAN
+STDMETHODCALLTYPE
CUSBRequest::ShouldReleaseRequestAfterCompletion()
{
if (m_Irp)
@@ -1577,6 +1586,7 @@
//-----------------------------------------------------------------------------------------
VOID
+STDMETHODCALLTYPE
CUSBRequest::FreeQueueHead(
IN struct _QUEUE_HEAD * QueueHead)
{
@@ -1639,6 +1649,7 @@
//-----------------------------------------------------------------------------------------
BOOLEAN
+STDMETHODCALLTYPE
CUSBRequest::IsQueueHeadComplete(
struct _QUEUE_HEAD * QueueHead)
{
@@ -1733,6 +1744,7 @@
//-----------------------------------------------------------------------------------------
NTSTATUS
+NTAPI
InternalCreateUSBRequest(
PUSBREQUEST *OutRequest)
{
Modified: trunk/reactos/drivers/usb/usbehci/usbehci.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usbehc…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/usbehci.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/usbehci.h [iso-8859-1] Wed Feb 29 09:41:34 2012
@@ -48,16 +48,16 @@
//
// hardware.cpp
//
-NTSTATUS CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
+NTSTATUS NTAPI CreateUSBHardware(PUSBHARDWAREDEVICE *OutHardware);
//
// usb_queue.cpp
//
-NTSTATUS CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
+NTSTATUS NTAPI CreateUSBQueue(PUSBQUEUE *OutUsbQueue);
//
// usb_request.cpp
//
-NTSTATUS InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
+NTSTATUS NTAPI InternalCreateUSBRequest(PUSBREQUEST *OutRequest);
#endif