Commit graph

23 commits

Author SHA1 Message Date
Johannes Anderwald 3dfadd12ae [USBEHCI]
- Enable sync frame list

svn path=/branches/usb-bringup/; revision=51827
2011-05-20 15:06:39 +00:00
Johannes Anderwald 9e2ca3d539 [USBEHCI]
- Pass memory manager to USBQueue object
- Fix bug in memory manager which did not check if an allocation equals page size
- Implement interrupt queue head array with frequencys of 1ms up to 32ms
- Store queue heads in the sync schedule array
- WIP

svn path=/branches/usb-bringup/; revision=51826
2011-05-20 14:47:15 +00:00
Michael Martin 741b7ea0aa [USBEHCI_NEW]
- When clearing feature port reset, remove the flag from Change and if the port is hardware enabled set the enable flag in Status. 
- When checking port status, if Change has any flags set an SCE request most be completed. Verified while writing usbhub driver in xp.
- Probably fixes a case where an endless loop of completing SCE requests.

svn path=/branches/usb-bringup/; revision=51642
2011-05-08 12:42:15 +00:00
Johannes Anderwald c2b34a98be [USBEHCI_NEW]
- Invoke status change callback at passive level
- Fill out usb descriptor struct instead passing everything in char array
- Use 1 byte interrupt endpoint packet size for hub for now
- Fill in interface information when SelectConfiguration request is passed. Fixes sce callback and pool corruptions
- Return device descriptor in USBHI_QueryDeviceInformation
- Tested in WinXP with special pool enabled & overrun support

svn path=/branches/usb-bringup/; revision=51572
2011-05-04 11:49:00 +00:00
Johannes Anderwald bca978808b [USBEHCI_NEW]
- Silence usb bulk control traces

svn path=/branches/usb-bringup/; revision=51507
2011-04-30 18:46:10 +00:00
Michael Martin 07dbb71da0 [USBEHCI_NEW]
- Set the NakCountReload to 0 in the QueueHead that is set in the Async register, as this is a dead QueueHead marked as halted and does not need it.
- Set the Async register in StartController. Note: The Async and Periodic registers can only be modified when the controller is stopped. 
- Driver now works in Qemu.

svn path=/branches/usb-bringup/; revision=51491
2011-04-29 06:14:44 +00:00
Johannes Anderwald a3f701378c [USBEHCI_NEW]
- Move error checking if controller reported an error inside the door bell ring check block
- Extend interface of IUSBRequest to include DeviceAddress, which is needed to retrieve configuration descriptor of newly set address
- Allocate CtrlSetup from nonpaged pool
- Release setup packet on cleanup
- Devices now receive an device address
- Currently asserts while retrieving configuration descriptor as this code path is not yet existant
*** Assertion failed: Urb->UrbHeader.UsbdDeviceHandle == NULL
***   Source File: d:\usb-bringup\drivers\usb\usbehci_new\hub_controller.cpp, line 1118

svn path=/branches/usb-bringup/; revision=51477
2011-04-28 16:40:07 +00:00
Johannes Anderwald ede1d48da4 [USBEHCI_NEW]
- Change interface to return real async queue head
- Set the async queue head register after the controller has been started
- Enable async queue in StartController
- Port DumpDeviceDescriptor from mjmartin usbehci driver
- Remove pseudo queue head from usb queue, instead use the real async queue head exported from IUSBHardwareDevice 
- Get physical address for transfer data in BuildControlTransferQueueHead
- Retrieving device descriptor now ~works, currently stops at setting device address (needs more work)

svn path=/branches/usb-bringup/; revision=51476
2011-04-28 15:16:33 +00:00
Johannes Anderwald ede324a063 [USBEHCI_NEW]
- Cache port status & port change settings because it appears that some ehci controllers do not store the status reset register bit correctly
- This commit is a temporary solutions, needs to be reworked
- Return correct status from HandleClassOther
- Handle IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION to return status success

svn path=/branches/usb-bringup/; revision=51473
2011-04-28 12:41:16 +00:00
Johannes Anderwald 591cffee7c [USBEHCI_NEW]
- Return the physical address of the async queue head in CUSBHardwareDevice::GetAsyncListRegister
- Remove superflous entries from queue head structure, they are processed within IUSBRequest class
- Remove USBHI_GetPortHackFlags, this function has been deprecated
- Add interface functions for IUSBRequest / IUSBQueue
- Callback into IUSBQueue when a hardware interrupt arrives
- Implement callback function to check for completed queue heads / free completed queue head depending on the Async Advance interrupt bit

svn path=/branches/usb-bringup/; revision=51466
2011-04-27 16:23:42 +00:00
Michael Martin 4dff45da57 [USBEHCI_NEW]
hub_controller: 
- Implement  StatusChangeEndpointCallBack called by HardwareDevice class when port status has changed on controller.
- Move Status Change Endpoint query code to IQueryStatusChageEndpoint as it is also needed by StatusChangeEndpointCallBack.
usb_request: 
- Implement InternalCreateUsbRequest.
usb_queue:
- Implement  CreateUsbRequest and AddUsbRequest
hardware:
- Implement GetAsyncListRegister and GetPeriodicListRegister.
- Implement SetStatusChangeEndpointCallBack for setting callback and context. Call the callback when a port status changes.
- Initialize the UsbQueue after creating the AsyncQueueHead, as the UsbQueue calls will call back with GetAsyncListRegister.



svn path=/branches/usb-bringup/; revision=51407
2011-04-20 04:30:22 +00:00
Michael Martin 9b8bc8512c [USBEHCI_NEW]
- Initialize the MemoryManager only after allocating a CommonBuffer to pass to it.
- Create a QueueHead to put into the AsyncList Register.


svn path=/branches/usb-bringup/; revision=51402
2011-04-19 15:06:26 +00:00
Michael Martin 775c4ce80d [USBEHCI_NEW]
- hub_controller: Implement Status Change Endpoint for RootHub. 
Handling the URB can return STATUS_PENDING, as in the new SCE code. Check for this before completing the Irp.
Uncomment calls to PortStatus, SetPortFeature, and ClearPortStatus now that they are implemented.
- For function receiving a port number check that its not larger than the actual number of ports on the controller.

svn path=/branches/usb-bringup/; revision=51401
2011-04-19 13:57:32 +00:00
Michael Martin c3d1d6fda9 [USBEHCI_NEW]
- Move USB_REQUEST_SET_FEATURE / USB_REQUEST_GET_FEATURE flags to header file.
- Remove QueueHead and Descriptor creation as its in UsbRequest.
- Move DMACommon Buffer allocation back to UsbHardwareDevice class.
- Implement Port Handling functions GetPortStatus, ClearPortStatus and SetPortFeature.
- Implement GetUSBQueue for returning pointer to UsbQueue and GetDMA to return DMAMemoryManager.
- Fix a typo in one of the defines for Port Register Flags.

svn path=/branches/usb-bringup/; revision=51397
2011-04-19 06:56:30 +00:00
Michael Martin 9067f34e6f [USBEHCI_NEW]
- Use LIST_ENTRY in QueueHeads and Descriptors vice Next and Previous Pointers.
- Add functions to interface for setting AsyncListRegister and PeriodicListRegister.
- USBHardwareDevice: Initialize USBQueue when handling PNPStart.
- USBQueue: Allocate Common Buffer and use it to Create and Initialize DmaMemoryManager object.
- USBQueue: Implement CreateQueueHead and CreateDescriptor.

svn path=/branches/usb-bringup/; revision=51388
2011-04-18 00:06:37 +00:00
Michael Martin bbad937d99 [USBEHCI_NEW]
- Update interfaces with new methods needed for UsbHardWare class.
- Remove GetDmaMemoryManager as the DmaMemory will only be needed by UsbQueue class.
- GetDeviceDetails: Only fill in a parameter if its not null.
- Start implementing UsbQueue class.

svn path=/branches/usb-bringup/; revision=51386
2011-04-17 22:06:20 +00:00
Michael Martin b8c05840fb [USBEHCI_NEW]
- Change VendorId and DeviceId to the same size as PciConfig members, PUSHORT.
- Add support function GetBusInterface.
- Implement GetDeviceDetails and ResetPort.

svn path=/branches/usb-bringup/; revision=51367
2011-04-16 06:59:45 +00:00
Michael Martin acbd41ebf5 [USBEHCI_NEW]
- Add flags for Port Status Control Register and remove structiures for Port Status Control Register.
- Remove USB Status Register and use the flags instead.
- Remove functions that are not used and never will be.
- Implement InterruptServiceRoutine and Deffered Procedure Routine.
- Partially implement port status change to detect device insert and removal.

svn path=/branches/usb-bringup/; revision=51366
2011-04-16 05:55:02 +00:00
Michael Martin 9b44c5121d [USBEHCI_NEW]
- Add flags and structures needed for communicating with controller and handling schedules.
- Add support routines for modifying operational registers on controller.
- Implement getting the controller capabilties, starting and stopping the controller.

svn path=/branches/usb-bringup/; revision=51365
2011-04-16 02:20:23 +00:00
Johannes Anderwald 6ba926eecc [USBEHCI_NEW]
- Fix build breakage from 51341

svn path=/branches/usb-bringup/; revision=51342
2011-04-14 13:03:01 +00:00
Johannes Anderwald abb1319801 [USBEHCI_NEW]
- Implement CUSBHardwareDevice::Initialize, CUSBHardwareDevice::AcquireDeviceLock, CUSBHardwareDevice::ReleaseDeviceLock
- Partly implement CUSBHardwareDevice::PnpStart
- Code from CUSBHardwareDevice::PnpStart was taken from mjmartin usbehci implementation

svn path=/branches/usb-bringup/; revision=51341
2011-04-14 12:55:41 +00:00
Johannes Anderwald 2e9250bbec [USBEHCI_NEW]
- Implement stubs for classes CHCDController and CUSBHardwareDevice
- Implement CreateHCDController, CreateUSBHardware
- Implement CUSBHardwareDevice::QueryInterface, CUSBHardwareDevice::AddRef, CUSBHardwareDevice::Release
- Implement CHCDController::AddRef, CHCDController::Release, CHCDController::QueryInterface

svn path=/branches/usb-bringup/; revision=51337
2011-04-14 11:58:07 +00:00
Johannes Anderwald 009b2e00df [USBEHCI_NEW]
- Create empty USB EHCI driver in c++
- Design & review the interfaces with mjmartin
- Create stubs for creating IUSBHardwareDevice / IHCDController classes
- Implement DriverEntry, EHCI_AddDevice and EHCI_Dispatch

svn path=/branches/usb-bringup/; revision=51335
2011-04-14 11:35:16 +00:00