//
// store device objects
- //
+ //
m_DriverObject = DriverObject;
m_FunctionalDeviceObject = FunctionalDeviceObject;
m_PhysicalDeviceObject = PhysicalDeviceObject;
}
//
- // 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);
//
m_Capabilities.PortRoute[(Count*2)+1] = (Value & 0x0F);
Count++;
- }while(Count < PortCount);
+ } while(Count < PortCount);
}
//
return Status;
}
- //
+ //
// Create a queuehead for the Async Register
//
m_MemoryManager->Allocate(sizeof(QUEUE_HEAD), (PVOID*)&AsyncQueueHead, &AsyncPhysicalAddress);
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
This = (CUSBHardwareDevice*) SystemArgument1;
CStatus = (ULONG) SystemArgument2;
- DPRINT("CStatus %x\n", CStatus);
+ DPRINT("EhciDefferedRoutine CStatus %lx\n", CStatus);
//
// check for completion of async schedule
//
// controller reported error
//
- DPRINT1("CStatus %x\n", CStatus);
+ DPRINT1("CStatus %lx\n", CStatus);
//ASSERT(FALSE);
}
//
// 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);
- }
+ 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
+ // check if the controller has acknowledged the door bell
//
if (CStatus & EHCI_STS_IAA)
{