Author: rgampa
Date: Wed Aug 23 11:44:56 2017
New Revision: 75650
URL:
http://svn.reactos.org/svn/reactos?rev=75650&view=rev
Log:
[USBXHCI]
- Fixed GCC build
- removed commented out code except for XHCI_ControllerWorkTest functions code.
- XHCI_ControllerWorkTest is a test function so the commented code in it can be used to
understand how other functions work
- also left out a few debug prints which were commented out to reduce windbg output
CORE-13344
Modified:
branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c
branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c
branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.h
Modified: branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/usbxhci/reactos/drive…
==============================================================================
--- branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c [iso-8859-1]
(original)
+++ branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/roothub.c [iso-8859-1] Wed
Aug 23 11:44:56 2017
@@ -9,10 +9,10 @@
XHCI_RH_GetRootHubData(IN PVOID xhciExtension,
IN PVOID rootHubData)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PUSBPORT_ROOT_HUB_DATA RootHubData;
DPRINT1("XHCI_RH_GetRootHubData: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PUSBPORT_ROOT_HUB_DATA RootHubData;
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
DPRINT_RH("XHCI_RH_GetRootHubData: XhciExtension - %p, rootHubData - %p\n",
@@ -28,7 +28,6 @@
Identifies a Compound Device: Hub is not part of a compound device.
Over-current Protection Mode: Global Over-current Protection.
*/
- //RootHubData->HubCharacteristics &= 3;
RootHubData->HubCharacteristics.AsUSHORT &= 3;
RootHubData->PowerOnToPowerGood = 2;
RootHubData->HubControlCurrent = 0;
@@ -48,13 +47,11 @@
NTAPI
XHCI_RH_GetPortStatus(IN PVOID xhciExtension,
IN USHORT Port,
- IN PULONG PortStatus)
-{
- //DPRINT1("XHCI_RH_GetPortStatus: function initiated\n"); commented to
remove too many windbg outputs
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
- //USBHUB_PORT_STATUS portstatus;
+ IN PUSB_PORT_STATUS_AND_CHANGE PortStatus)
+{
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
USB_PORT_STATUS_AND_CHANGE portstatus;
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
@@ -62,58 +59,6 @@
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
PortStatusRegister.AsULONG = READ_REGISTER_ULONG(PortStatusRegPointer);
- /*
- ULONG ConnectStatus : 1; // Current Connect Status
- ULONG EnableStatus : 1; // Port Enabled/Disabled
- ULONG SuspendStatus : 1;
- ULONG OverCurrent : 1;
- ULONG ResetStatus : 1;
- ULONG Reserved1 : 3;
- ULONG PowerStatus : 1;
- ULONG LsDeviceAttached : 1; // Low-Speed Device Attached
- ULONG HsDeviceAttached : 1; // High-speed Device Attached
- ULONG TestMode : 1; // Port Test Mode
- ULONG IndicatorControl : 1; // Port Indicator Control
- ULONG Reserved2 : 3;
- ULONG ConnectStatusChange : 1;
- ULONG EnableStatusChange : 1;
- ULONG SuspendStatusChange : 1;
- ULONG OverCurrentChange : 1;
- ULONG ResetStatusChange : 1;
- ULONG Reserved3 : 3;
- ULONG PowerStatusChange : 1;
- ULONG LsDeviceAttachedChange : 1;
- ULONG HsDeviceAttachedChange : 1;
- ULONG TestModeChange : 1;
- ULONG IndicatorControlChange : 1;
- ULONG Reserved4 : 3;
- */
- /* register interface
- ULONG CurrentConnectStatus : 1;
- ULONG PortEnableDisable : 1;
- ULONG RsvdZ1 : 1;
- ULONG OverCurrentActive : 1;
- ULONG PortReset : 1;
- ULONG PortLinkState : 4;
- ULONG PortPower : 1;
- ULONG PortSpeed : 4;
- ULONG PortIndicatorControl : 2;
- ULONG LinkWriteStrobe : 1;
- ULONG ConnectStatusChange : 1;
- ULONG PortEnableDisableChange : 1;
- ULONG WarmResetChange : 1;
- ULONG OverCurrentChange : 1;
- ULONG PortResetChange : 1;
- ULONG PortLinkStateChange : 1;
- ULONG ConfigErrorChange : 1;
- ULONG ColdAttachStatus : 1;
- ULONG WakeONConnectEnable : 1;
- ULONG WakeONDisconnectEnable : 1;
- ULONG WakeONOverCurrentEnable : 1;
- ULONG RsvdZ2 : 2;
- ULONG DeviceRemovable : 1;
- ULONG WarmPortReset : 1;
- */
portstatus.AsUlong32 = 0;
portstatus.PortStatus.Usb20PortStatus.CurrentConnectStatus =
PortStatusRegister.CurrentConnectStatus;
@@ -123,12 +68,7 @@
portstatus.PortStatus.Usb20PortStatus.Reset = PortStatusRegister.PortReset;
portstatus.PortStatus.Usb20PortStatus.PortPower = PortStatusRegister.PortPower;
portstatus.PortStatus.Usb20PortStatus.LowSpeedDeviceAttached =
0;//PortStatusRegister.PortEnableDisabl
- //portstatus.PortStatus.Usb20PortStatus.LsDeviceAttached =
0;//PortStatusRegister.PortEnableDisable;
- // if (PortStatusRegister.PortSpeed)
- //{ // this check is not needed in vmware. removed for testing.
- //portstatus.PortStatus.Usb20PortStatus.HsDeviceAttached =
PortStatusRegister.CurrentConnectStatus;
- portstatus.PortStatus.Usb20PortStatus.HighSpeedDeviceAttached =
PortStatusRegister.CurrentConnectStatus;
- //}
+ portstatus.PortStatus.Usb20PortStatus.HighSpeedDeviceAttached =
PortStatusRegister.CurrentConnectStatus;
portstatus.PortStatus.Usb20PortStatus.PortTestMode =
0;//PortStatusRegister.PortPower;
portstatus.PortStatus.Usb20PortStatus.PortIndicatorControl =
0;//PortStatusRegister.PortIndicatorControl;
@@ -139,7 +79,7 @@
portstatus.PortChange.Usb20PortChange.OverCurrentIndicatorChange =
PortStatusRegister.OverCurrentChange;
portstatus.PortChange.Usb20PortChange.ResetChange =
PortStatusRegister.PortResetChange;
- *PortStatus = portstatus.AsUlong32;
+ *PortStatus = portstatus;
return MP_STATUS_SUCCESS;
}
@@ -147,10 +87,10 @@
MPSTATUS
NTAPI
XHCI_RH_GetHubStatus(IN PVOID xhciExtension,
- IN PULONG HubStatus)
+ IN PUSB_HUB_STATUS_AND_CHANGE HubStatus)
{
//DPRINT1("XHCI_RH_GetHubStatus: function initiated\n"); //removed to
reduce windbg output
- *HubStatus = 0;
+ HubStatus->AsUlong32 = 0;
return 0;
}
@@ -176,12 +116,12 @@
XHCI_RH_SetFeaturePortReset(IN PVOID xhciExtension,
IN USHORT Port)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
+
DPRINT1("XHCI_RH_SetFeaturePortReset: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
@@ -200,11 +140,11 @@
XHCI_RH_SetFeaturePortPower(IN PVOID xhciExtension,
IN USHORT Port)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
DPRINT1("XHCI_RH_SetFeaturePortPower: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
@@ -240,11 +180,11 @@
XHCI_RH_ClearFeaturePortEnable(IN PVOID xhciExtension,
IN USHORT Port)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
DPRINT1("XHCI_RH_ClearFeaturePortEnable: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
@@ -301,11 +241,11 @@
XHCI_RH_ClearFeaturePortConnectChange(IN PVOID xhciExtension,
IN USHORT Port)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
DPRINT1("XHCI_RH_ClearFeaturePortConnectChange: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
@@ -327,11 +267,11 @@
XHCI_RH_ClearFeaturePortResetChange(IN PVOID xhciExtension,
IN USHORT Port)
{
+
+ PXHCI_EXTENSION XhciExtension;
+ PULONG PortStatusRegPointer;
+ XHCI_PORT_STATUS_CONTROL PortStatusRegister;
DPRINT1("XHCI_RH_ClearFeaturePortResetChange: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
- PULONG PortStatusRegPointer;
- XHCI_PORT_STATUS_CONTROL PortStatusRegister;
-
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
ASSERT(Port != 0 && Port <= XhciExtension->NumberOfPorts);
PortStatusRegPointer = (XhciExtension->OperationalRegs) + (XHCI_PORTSC + (Port -
1)*4);
Modified: branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/usbxhci/reactos/drive…
==============================================================================
--- branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c [iso-8859-1]
(original)
+++ branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.c [iso-8859-1] Wed
Aug 23 11:44:56 2017
@@ -40,40 +40,28 @@
IN PVOID endpointParameters,
IN PULONG EndpointRequirements)
{
- DPRINT1("XHCI_QueryEndpointRequirements: function initiated\n");
PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties = endpointParameters;
ULONG TransferType;
-
+
+ DPRINT1("XHCI_QueryEndpointRequirements: function initiated\n");
TransferType = EndpointProperties->TransferType;
switch (TransferType)
{
case USBPORT_TRANSFER_TYPE_ISOCHRONOUS:
DPRINT1("XHCI_QueryEndpointRequirements: IsoTransfer\n");
- //EndpointRequirements[1] = OHCI_MAX_ISO_TRANSFER_SIZE;
- //EndpointRequirements[0] = sizeof(OHCI_HCD_ED) +
- // OHCI_MAX_ISO_TD_COUNT * sizeof(OHCI_HCD_TD);
break;
case USBPORT_TRANSFER_TYPE_CONTROL:
DPRINT1("XHCI_QueryEndpointRequirements: ControlTransfer\n");
- //EndpointRequirements[1] = 0; //OHCI_MAX_CONTROL_TRANSFER_SIZE;
- //EndpointRequirements[0] = 0; //sizeof(OHCI_HCD_ED) +
- // OHCI_MAX_CONTROL_TD_COUNT * sizeof(OHCI_HCD_TD);
break;
case USBPORT_TRANSFER_TYPE_BULK:
DPRINT1("XHCI_QueryEndpointRequirements: BulkTransfer\n");
- //EndpointRequirements[1] = OHCI_MAX_BULK_TRANSFER_SIZE;
- //EndpointRequirements[0] = sizeof(OHCI_HCD_ED) +
- // OHCI_MAX_BULK_TD_COUNT * sizeof(OHCI_HCD_TD);
break;
case USBPORT_TRANSFER_TYPE_INTERRUPT:
DPRINT1("XHCI_QueryEndpointRequirements: InterruptTransfer\n");
- //EndpointRequirements[1] = OHCI_MAX_INTERRUPT_TRANSFER_SIZE;
- //EndpointRequirements[0] = sizeof(OHCI_HCD_ED) +
- // OHCI_MAX_INTERRUPT_TD_COUNT *
sizeof(OHCI_HCD_TD);
break;
default:
@@ -246,7 +234,7 @@
IN PXHCI_HC_RESOURCES HcResourcesVA,
IN PVOID resourcesStartPA)
{
- DPRINT1("XHCI_ControllerWorkTest: Initiated.\n");
+
/*PULONG DoorBellRegisterBase;
//XHCI_DOORBELL Doorbell_0;
LARGE_INTEGER CurrentTime = {{0, 0}};
@@ -265,7 +253,9 @@
XHCI_EVENT_RING_SEGMENT_TABLE EventRingSegTable; */
// place a no op command trb on the command ring
XHCI_TRB trb;
+ int i = 0;
//XHCI_TRB eventtrb;
+ DPRINT1("XHCI_ControllerWorkTest: Initiated.\n");
trb.CommandTRB.NoOperation.RsvdZ1 = 0;
trb.CommandTRB.NoOperation.RsvdZ2 = 0;
trb.CommandTRB.NoOperation.RsvdZ3 = 0;
@@ -273,7 +263,7 @@
trb.CommandTRB.NoOperation.RsvdZ4 = 0;
trb.CommandTRB.NoOperation.TRBType = NO_OP_COMMAND;
trb.CommandTRB.NoOperation.RsvdZ5 = 0;
- for(int i=0; i<256; i++){
+ for(i=0; i<256; i++){
XHCI_SendCommand(trb,XhciExtension);
//XHCI_ProcessEvent(XhciExtension);
@@ -352,11 +342,10 @@
IN PVOID resourcesStartVA,
IN PVOID resourcesStartPA)
{
- DPRINT1("XHCI_InitializeResources: function initiated\n");
+
PXHCI_HC_RESOURCES HcResourcesVA;
PHYSICAL_ADDRESS HcResourcesPA;
- PULONG BaseIoAdress;
PULONG OperationalRegs;
USHORT PageSize;
USHORT MaxScratchPadBuffers;
@@ -376,7 +365,9 @@
PMDL ScratchPadArrayMDL;
PXHCI_SCRATCHPAD_BUFFER_ARRAY BufferArrayPointer;
PMDL ScratchPadBufferMDL;
-
+ int i = 0;
+
+ DPRINT1("XHCI_InitializeResources: function initiated\n");
DPRINT_XHCI("XHCI_InitializeResources: BaseVA - %p, BasePA - %p\n",
resourcesStartVA,
resourcesStartPA);
@@ -387,7 +378,6 @@
HcResourcesPA.QuadPart = (ULONG_PTR)resourcesStartPA;
XhciExtension->HcResourcesPA = HcResourcesPA;
- BaseIoAdress = XhciExtension->BaseIoAdress;
OperationalRegs = XhciExtension->OperationalRegs;
//DCBAA init
@@ -399,7 +389,7 @@
// command ring intialisation.
HcResourcesVA->CommandRing.enqueue_pointer =
&(HcResourcesVA->CommandRing.firstSeg.XhciTrb[0]);
HcResourcesVA->CommandRing.dequeue_pointer =
&(HcResourcesVA->CommandRing.firstSeg.XhciTrb[0]);
- for (int i=0; i<256; i++)
+ for (i=0; i<256; i++)
{
HcResourcesVA->CommandRing.firstSeg.XhciTrb[i].GenericTRB.Word0 = 0;
HcResourcesVA->CommandRing.firstSeg.XhciTrb[i].GenericTRB.Word1 = 0;
@@ -468,7 +458,7 @@
// intially enque and deque are equal.
- for (int i=0; i<256; i++)
+ for (i=0; i<256; i++)
{
HcResourcesVA->EventRing.firstSeg.XhciTrb[i].GenericTRB.Word0 = 0;
HcResourcesVA->EventRing.firstSeg.XhciTrb[i].GenericTRB.Word1 = 0;
@@ -484,7 +474,6 @@
{ // xHCI may declare 0 scratchpad arrays. if so there is no need for memory
allocation.
return MP_STATUS_SUCCESS;
}
- //if ((PageSize & (1 << 0)) == 0){ // this is how it is implemented in
Haiko
if ((PageSize & (1 << 0)) == 0)
{
DPRINT1("XHCI_InitializeResources : fail. does not support 4k page size
%p\n",PageSize);
@@ -528,7 +517,7 @@
MmFreeContiguousMemory(BufferArrayPointer);
return MP_STATUS_FAILURE;
}
- for (int i = 0; i < MaxScratchPadBuffers ; i++)
+ for (i = 0; i < MaxScratchPadBuffers ; i++)
{
BufferArrayPointer[i].AsULONGLONG = MmGetMdlPfnArray(ScratchPadBufferMDL)[i]
<< PAGE_SHIFT;
}
@@ -541,7 +530,6 @@
NTAPI
XHCI_InitializeHardware(IN PXHCI_EXTENSION XhciExtension)
{
- DPRINT1("XHCI_InitializeHardware: function initiated\n");
PULONG BaseIoAdress;
PULONG OperationalRegs;
XHCI_USB_COMMAND Command;
@@ -551,6 +539,7 @@
XHCI_HC_STRUCTURAL_PARAMS_1 StructuralParams_1;
XHCI_CONFIGURE Config;
+ DPRINT1("XHCI_InitializeHardware: function initiated\n");
DPRINT1("XHCI_InitializeHardware: ... \n");
OperationalRegs = XhciExtension->OperationalRegs;
@@ -604,7 +593,7 @@
XHCI_StartController(IN PVOID xhciExtension,
IN PUSBPORT_RESOURCES Resources)
{
- DPRINT1("XHCI_StartController: function initiated\n");
+
PXHCI_EXTENSION XhciExtension;
PULONG BaseIoAdress;
PULONG OperationalRegs;
@@ -621,6 +610,7 @@
USHORT MaxScratchPadBuffers;
XHCI_HC_STRUCTURAL_PARAMS_2 HCSPARAMS2;
+ DPRINT1("XHCI_StartController: function initiated\n");
if ((Resources->ResourcesTypes & (USBPORT_RESOURCES_MEMORY |
USBPORT_RESOURCES_INTERRUPT)) !=
(USBPORT_RESOURCES_MEMORY |
USBPORT_RESOURCES_INTERRUPT))
{
@@ -709,13 +699,14 @@
XHCI_StopController(IN PVOID xhciExtension,
IN BOOLEAN IsDoDisableInterrupts)
{
- DPRINT1("XHCI_StopController: Function initiated. FIXME\n");
+
PXHCI_EXTENSION XhciExtension;
USHORT MaxScratchPadBuffers;
PMDL ScratchPadArrayMDL;
PMDL ScratchPadBufferMDL;
PXHCI_SCRATCHPAD_BUFFER_ARRAY BufferArrayPointer;
+ DPRINT1("XHCI_StopController: Function initiated. FIXME\n");
XhciExtension = (PXHCI_EXTENSION) xhciExtension;
MaxScratchPadBuffers = XhciExtension->MaxScratchPadBuffers;
// free memory allocated to scratchpad buffers.
@@ -738,20 +729,22 @@
NTAPI
XHCI_SuspendController(IN PVOID xhciExtension)
{
+
+ PXHCI_EXTENSION XhciExtension;
DPRINT1("XHCI_SuspendController: function initiated\n");
+ XhciExtension = (PXHCI_EXTENSION)xhciExtension;
+
+ XhciExtension->Flags |= XHCI_FLAGS_CONTROLLER_SUSPEND;
+
+}
+
+MPSTATUS
+NTAPI
+XHCI_ResumeController(IN PVOID xhciExtension)
+{
+
PXHCI_EXTENSION XhciExtension;
- XhciExtension = (PXHCI_EXTENSION)xhciExtension;
-
- XhciExtension->Flags |= XHCI_FLAGS_CONTROLLER_SUSPEND;
-
-}
-
-MPSTATUS
-NTAPI
-XHCI_ResumeController(IN PVOID xhciExtension)
-{
DPRINT1("XHCI_ResumeController: function initiated\n");
- PXHCI_EXTENSION XhciExtension;
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
XhciExtension->Flags &= ~XHCI_FLAGS_CONTROLLER_SUSPEND;
@@ -771,11 +764,12 @@
NTAPI
XHCI_InterruptService(IN PVOID xhciExtension)
{
- DPRINT1("XHCI_InterruptService: function initiated\n");
+
PULONG RunTimeRegisterBase;
XHCI_INTERRUPTER_MANAGEMENT Iman;
PXHCI_EXTENSION XhciExtension;
+ DPRINT1("XHCI_InterruptService: function initiated\n");
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
RunTimeRegisterBase = XhciExtension->RunTimeRegisterBase;
@@ -883,7 +877,6 @@
NTAPI
XHCI_CheckController(IN PVOID xhciExtension)
{
- //RegPacket.UsbPortInvalidateController(xhciExtension, 2);
//DPRINT1("XHCI_CheckController: function initiated\n");
}
@@ -906,14 +899,13 @@
NTAPI
XHCI_EnableInterrupts(IN PVOID xhciExtension)
{
- DPRINT1("XHCI_EnableInterrupts: function initiated\n");
+
PXHCI_EXTENSION XhciExtension;
- PULONG OperationalRegs;
PULONG RunTimeRegisterBase;
XHCI_INTERRUPTER_MANAGEMENT Iman;
+ DPRINT1("XHCI_EnableInterrupts: function initiated\n");
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
- OperationalRegs = XhciExtension->OperationalRegs;
RunTimeRegisterBase = XhciExtension->RunTimeRegisterBase;
Iman.AsULONG = READ_REGISTER_ULONG(RunTimeRegisterBase + XHCI_IMAN);
@@ -926,14 +918,12 @@
NTAPI
XHCI_DisableInterrupts(IN PVOID xhciExtension)
{
- DPRINT1("XHCI_DisableInterrupts: function initiated\n");
+
PXHCI_EXTENSION XhciExtension;
- PULONG OperationalRegs;
PULONG RunTimeRegisterBase;
XHCI_INTERRUPTER_MANAGEMENT Iman;
-
+ DPRINT1("XHCI_DisableInterrupts: function initiated\n");
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
- OperationalRegs = XhciExtension->OperationalRegs;
RunTimeRegisterBase = XhciExtension -> RunTimeRegisterBase;
Iman.AsULONG = READ_REGISTER_ULONG(RunTimeRegisterBase + XHCI_IMAN);
@@ -949,10 +939,8 @@
{
//DPRINT1("XHCI_PollController: function initiated\n"); commented out to
reduce windbg output
PXHCI_EXTENSION XhciExtension;
- PULONG OperationalRegs;
XhciExtension = (PXHCI_EXTENSION)xhciExtension;
- OperationalRegs = XhciExtension->OperationalRegs;
if (!(XhciExtension->Flags & XHCI_FLAGS_CONTROLLER_SUSPEND))
{
Modified: branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/usbxhci/reactos/drive…
==============================================================================
--- branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.h [iso-8859-1]
(original)
+++ branches/GSoC_2017/usbxhci/reactos/drivers/usb/usbxhci/usbxhci.h [iso-8859-1] Wed
Aug 23 11:44:56 2017
@@ -136,7 +136,6 @@
ULONG TRBType : 6;
ULONG RsvdZ5 : 16;
};
- //ULONG AsULONG;
} XHCI_LINK_TRB;
C_ASSERT(sizeof(XHCI_LINK_TRB) == 16);
@@ -460,13 +459,13 @@
XHCI_RH_GetPortStatus(
IN PVOID xhciExtension,
IN USHORT Port,
- IN PULONG PortStatus);
+ IN PUSB_PORT_STATUS_AND_CHANGE PortStatus);
MPSTATUS
NTAPI
XHCI_RH_GetHubStatus(
IN PVOID xhciExtension,
- IN PULONG HubStatus);
+ IN PUSB_HUB_STATUS_AND_CHANGE HubStatus);
MPSTATUS
NTAPI