Author: tfaber
Date: Sun Mar 30 09:17:18 2014
New Revision: 62582
URL:
http://svn.reactos.org/svn/reactos?rev=62582&view=rev
Log:
[USBEHCI]
- Fix some debug prints and some whitespace issues
Modified:
trunk/reactos/drivers/usb/usbehci/hardware.cpp
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] Sun Mar 30 09:17:18 2014
@@ -171,7 +171,7 @@
//
// store device objects
- //
+ //
m_DriverObject = DriverObject;
m_FunctionalDeviceObject = FunctionalDeviceObject;
m_PhysicalDeviceObject = PhysicalDeviceObject;
@@ -357,17 +357,17 @@
}
//
- // Get controllers capabilities
+ // Get controllers capabilities
//
m_Capabilities.Length = READ_REGISTER_UCHAR((PUCHAR)ResourceBase +
EHCI_CAPLENGTH);
- m_Capabilities.HCIVersion =
READ_REGISTER_USHORT((PUSHORT)((ULONG)ResourceBase + EHCI_HCIVERSION));
- m_Capabilities.HCSParamsLong =
READ_REGISTER_ULONG((PULONG)((ULONG)ResourceBase + EHCI_HCSPARAMS));
- m_Capabilities.HCCParamsLong =
READ_REGISTER_ULONG((PULONG)((ULONG)ResourceBase + EHCI_HCCPARAMS));
-
- DPRINT1("Controller has %c Length\n", m_Capabilities.Length);
- DPRINT1("Controller EHCI Version %x\n",
m_Capabilities.HCIVersion);
- DPRINT1("Controller EHCI Caps HCSParamsLong %x\n",
m_Capabilities.HCSParamsLong);
- DPRINT1("Controller EHCI Caps HCCParamsLong %x\n",
m_Capabilities.HCCParamsLong);
+ m_Capabilities.HCIVersion =
READ_REGISTER_USHORT((PUSHORT)((ULONG_PTR)ResourceBase + EHCI_HCIVERSION));
+ m_Capabilities.HCSParamsLong =
READ_REGISTER_ULONG((PULONG)((ULONG_PTR)ResourceBase + EHCI_HCSPARAMS));
+ m_Capabilities.HCCParamsLong =
READ_REGISTER_ULONG((PULONG)((ULONG_PTR)ResourceBase + EHCI_HCCPARAMS));
+
+ DPRINT1("Controller Capabilities Length 0x%x\n",
m_Capabilities.Length);
+ DPRINT1("Controller EHCI Version 0x%x\n",
m_Capabilities.HCIVersion);
+ DPRINT1("Controller EHCI Caps HCSParamsLong 0x%lx\n",
m_Capabilities.HCSParamsLong);
+ DPRINT1("Controller EHCI Caps HCCParamsLong 0x%lx\n",
m_Capabilities.HCCParamsLong);
DPRINT1("Controller has %lu Ports\n",
m_Capabilities.HCSParams.PortCount);
//
@@ -391,7 +391,7 @@
m_Capabilities.PortRoute[(Count*2)+1] = (Value & 0x0F);
Count++;
- }while(Count < PortCount);
+ } while(Count < PortCount);
}
//
@@ -456,7 +456,7 @@
return Status;
}
- //
+ //
// Create a queuehead for the Async Register
//
m_MemoryManager->Allocate(sizeof(QUEUE_HEAD), (PVOID*)&AsyncQueueHead,
&AsyncPhysicalAddress);
@@ -1250,7 +1250,7 @@
CStatus = This->EHCI_READ_REGISTER_ULONG(EHCI_USBSTS);
CStatus &= (EHCI_ERROR_INT | EHCI_STS_INT | EHCI_STS_IAA | EHCI_STS_PCD |
EHCI_STS_FLR);
- DPRINT("CStatus %x\n", CStatus);
+ DPRINT("InterruptServiceRoutine CStatus %lx\n", CStatus);
//
// Check that it belongs to EHCI
@@ -1301,7 +1301,7 @@
This = (CUSBHardwareDevice*) SystemArgument1;
CStatus = (ULONG) SystemArgument2;
- DPRINT("CStatus %x\n", CStatus);
+ DPRINT("EhciDefferedRoutine CStatus %lx\n", CStatus);
//
// check for completion of async schedule
@@ -1318,7 +1318,7 @@
//
// controller reported error
//
- DPRINT1("CStatus %x\n", CStatus);
+ DPRINT1("CStatus %lx\n", CStatus);
//ASSERT(FALSE);
}
@@ -1330,33 +1330,33 @@
//
// was a queue head completed?
//
- if (ShouldRingDoorBell)
- {
- //
- // set door ring bell in progress status flag
- //
- This->m_DoorBellRingInProgress = TRUE;
-
- //
- // get command register
- //
- This->GetCommandRegister(&UsbCmd);
-
- //
- // set door rang bell bit
- //
- UsbCmd.DoorBell = TRUE;
-
- //
- // update command status
- //
- This->SetCommandRegister(&UsbCmd);
- }
- }
- }
-
- //
- // check if the controller has acknowledged the door bell
+ if (ShouldRingDoorBell)
+ {
+ //
+ // set door ring bell in progress status flag
+ //
+ This->m_DoorBellRingInProgress = TRUE;
+
+ //
+ // get command register
+ //
+ This->GetCommandRegister(&UsbCmd);
+
+ //
+ // set door rang bell bit
+ //
+ UsbCmd.DoorBell = TRUE;
+
+ //
+ // update command status
+ //
+ This->SetCommandRegister(&UsbCmd);
+ }
+ }
+ }
+
+ //
+ // check if the controller has acknowledged the door bell
//
if (CStatus & EHCI_STS_IAA)
{