Commit graph

23 commits

Author SHA1 Message Date
Johannes Anderwald 547ea14508 [USBEHCI_NEW]
- Port URB_FUNCTION_CLASS_INTERFACE from mjmartin usbehci driver
- Fix typo in interface declaration
- Disable assert for now
- Return irp status pending when irp is added to the queue
- Fix bug in InternalGetPidDirection
- More work on the bulk transfers, not yet working

svn path=/branches/usb-bringup/; revision=51501
2011-04-30 08:04:35 +00:00
Johannes Anderwald 3b6ba2f1d8 [USBEHCI_NEW]
- Implement SelectInterface / SelectConfiguration based on mjmartin usbehci driver
- Initialization runs untill SelectInterface request
- Tested with WinXP SP2

svn path=/branches/usb-bringup/; revision=51489
2011-04-29 02:46:04 +00:00
Johannes Anderwald e8cf4c5591 [USBEHCI_NEW]
- Remove assert for unknown clear feature
- Implement retrieving string descriptors, based on mjmartin usbehci driver
- Start implementing USBHI_RestoreUsbDevice
- Fixup device stack in USBHI_SetDeviceHandleData. Needs more investigation

svn path=/branches/usb-bringup/; revision=51487
2011-04-28 23:59:53 +00:00
Johannes Anderwald 823176506d [USBEHCI_NEW]
- Implement retrieving device / configuration descriptor for usb devices
- Based on mjmartin usbehci driver
- Mass storage device found wizard now pops up (fails to install - WIP)

svn path=/branches/usb-bringup/; revision=51478
2011-04-28 17:45:32 +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 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
Johannes Anderwald 346a95197f [USBEHCI_NEW]
- Fix build 
- Implement retrieving configuration descriptor (USBHI_GetUsbDescriptors)
- Implement function to build a setup packet from urb (taken from mjmartin usbehci driver)

svn path=/branches/usb-bringup/; revision=51443
2011-04-24 09:26:22 +00:00
Johannes Anderwald 982eb59ba0 [USBEHCI_NEW]
- Create member for storing the request object
- Add interface function which is invoked when the queue head should be freed
- Add support functions which deal with completed queue heads

svn path=/branches/usb-bringup/; revision=51440
2011-04-23 19:36:23 +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
Johannes Anderwald d4f7a44a18 [USBEHCI_NEW]
- Fix warning because comparing signed vs unsigned
- Implement function for retrieving the device descriptor
- Implement function for retrieving a configuration descriptor (including contained interface descriptor and endpoint descriptor)
- Cleanup interface for IUSBRequest:
- When caller initializes IUSBRequest with an IRP, then the operation mode is asynchronously. Therefore when the request is completed, IUSBRequest::ShouldReleaseRequestAfterCompletion will return true, which makes IUSBQueue call Release on IUSBRequest
- When the caller initializes IUSBRequest with an setup packet, the operation mode is synchronously. After submitting the IUSBRequest to queue, the caller should call IUSBRequest::GetResultStatus. This function will then block untill the operation has been completed. However, the caller needs to call Release() as those requests are not cleaned up by the IUSBQueue


svn path=/branches/usb-bringup/; revision=51406
2011-04-19 18:35:40 +00:00
Michael Martin 40e499c2d4 [USBEHCI_NEW]
- Forgotten changes in r51397.

svn path=/branches/usb-bringup/; revision=51398
2011-04-19 07:36:44 +00:00
Johannes Anderwald 3ac2c07f55 [USBEHCI_NEW]
- Null terminate buffer from IOCTL_USB_GET_ROOT_HUB_NAME, fixes usbview problems
- Implement URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER, IUSBHardware needs more work
- Silence debug traces
- Start implementing IUSBRequest interfaces
- Complete unhandled major irp with status success

svn path=/branches/usb-bringup/; revision=51396
2011-04-19 01:21:10 +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
Johannes Anderwald a2b99febfa [USBEHCI_NEW]
- Add interface function GetHubControllerSymbolicLink
- Implement IOCTL_USB_GET_ROOT_HUB_NAME for usbview

svn path=/branches/usb-bringup/; revision=51387
2011-04-17 22:38:32 +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
Johannes Anderwald 5290479c41 [USBEHCI_NEW]
- Setup a default device descriptor for the root hub and initialize it with vendor & product id
- Partly implement URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE, URB_FUNCTION_CLASS_DEVICE
- based on mjmartin usbehci 

svn path=/branches/usb-bringup/; revision=51384
2011-04-17 19:23:13 +00:00
Johannes Anderwald 79bfd697d0 [USBEHCI_NEW]
- Fix bug in CDMAMemoryManager initialization, which calculated the bitmap length wrong
- Create interface IUSBDevice, which will be used to abstract connected usb devices
- Implement support functions for the device interface. 
- Implement USBHI_CreateUsbDevice, USBHI_InitializeUsbDevice, USBHI_GetUsbDescriptors, USBHI_RemoveUsbDevice, USBHI_GetExtendedHubInformation, USBHI_RootHubInitNotification, USBHI_SetDeviceHandleData, USBDI_GetUSBDIVersion, USBDI_IsDeviceHighSpeed
- Partly implement USBHI_QueryDeviceInformation
- Based on mjmartin usbehci 

svn path=/branches/usb-bringup/; revision=51372
2011-04-17 08:20:40 +00:00
Johannes Anderwald e06b7ac5cc [USBEHCI_NEW]
- Implement IDMAMemoryManager interface, with IDMAMemoryManager::Allocate, IDMAMemoryManager::Free
- Fix interface of IDMAMemoryManager
- Will be used by IUSBHardwareDevice

svn path=/branches/usb-bringup/; revision=51369
2011-04-16 12:26:06 +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
Johannes Anderwald a61d852c84 [USBEHCI_NEW]
- Create Interface IDispatchIrp which is used to handle ioctl requests
- Partly implement IHubController interface

svn path=/branches/usb-bringup/; revision=51355
2011-04-15 17:57:24 +00:00
Johannes Anderwald 6815708639 [USBEHCI_NEW]
- Define tag for allocations
- Fixes assert hit in ReactOS
- Fix typo in IHubController interface declaration

svn path=/branches/usb-bringup/; revision=51353
2011-04-15 15:45:09 +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