Commit graph

210 commits

Author SHA1 Message Date
Johannes Anderwald a960e537aa [USBCCGP]
- Implement counting of all interface descriptors
- Store device descriptor and configuration descriptor in pdo device extension
- Store all interface descriptors for an composite audio device
- Implement parsing and constructing a special configuration descriptor for each individual device function
- Implement URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE for device descriptor and configuration descriptor
- USBGCCGP now receives select configuration request
- Tested in XP + Ros USB Stack + USB Audio Device

svn path=/branches/usb-bringup-trunk/; revision=55261
2012-01-27 20:58:58 +00:00
Johannes Anderwald 35c824d26f [USBCCGP]
- Use Function index than interface number. Fixes invalid hardware ids
- Fix construction of compatible id
- USB Audio device now installs on XP when usbccgp is used 
- Now asserts in sb-bringup-trunk\drivers\usb\usbccgp\pdo.c:343) PDO_Dispatch Function f not implemented, which is implemented next

svn path=/branches/usb-bringup-trunk/; revision=55255
2012-01-27 18:33:41 +00:00
Johannes Anderwald 07e8b3be9b [USBCCGP]
- Implement counting interface descriptors
- Fix allocating interface list
- Fix multiple bugs when copying interface information
- Implement support function to dump function descriptor
- Fix multiple bugs when creating compatible / hardware id string
- Implement legacy enumerator, which will be used for HID composite devices
- Implement special enumerator for audio devices
- Display static GenericCompositeUSBDeviceString, needs to be read from registry in order to be MUI aware
- Device initializes and device wizard pops up
- Tested in XP with Ros USB stack + USB Audio Microphone 

svn path=/branches/usb-bringup-trunk/; revision=55253
2012-01-27 18:04:39 +00:00
Johannes Anderwald 0a2f895e36 [USBHUB_NEW]
- Rewrite GetDeviceIds function
- Don't rely on hardcoded constants when building the device id strings
- Don't corrupt the device id string when building the instance id string
- Fix bug in GetUsbStringDescriptor which read beyond the allocated string when copying the result.

svn path=/branches/usb-bringup-trunk/; revision=55238
2012-01-27 12:29:18 +00:00
Cameron Gutman 6f54b01f29 [USBEHCI]
- Fix initialization bugs for EHCI controllers
- Try again to release ownership of low-speed devices after reset
- Wait for the port reset to complete

svn path=/branches/usb-bringup-trunk/; revision=55232
2012-01-27 06:27:12 +00:00
Cameron Gutman 9b540bf8a8 [USBOHCI]
- Attempt to fix reset race conditions

svn path=/branches/usb-bringup-trunk/; revision=55231
2012-01-27 05:20:37 +00:00
Johannes Anderwald a594afcd76 [USBOHCI]
- Revert previous revision

svn path=/branches/usb-bringup-trunk/; revision=55230
2012-01-27 02:12:32 +00:00
Johannes Anderwald 972bb5254a [USBOHCI]
- Fix setting device address

svn path=/branches/usb-bringup-trunk/; revision=55229
2012-01-27 02:09:18 +00:00
Cameron Gutman bad9585013 [USBHUB_NEW]
- Fix buffer overflow for composite devices

svn path=/branches/usb-bringup-trunk/; revision=55228
2012-01-27 02:02:11 +00:00
Cameron Gutman f0363e1cc1 [USBEHCI_NEW]
- Disable debug spam

svn path=/branches/usb-bringup-trunk/; revision=55225
2012-01-26 20:25:12 +00:00
Cameron Gutman bc7a50b969 [USBSTOR]
- Set the correct transfer direction value in the CBW
- Fixes the infamous system hang that occurred when writing to a USB drive

svn path=/branches/usb-bringup-trunk/; revision=55223
2012-01-26 20:02:42 +00:00
Cameron Gutman 38758cfacb [USBSTOR]
- USBD_SHORT_TRANSFER_OK is only a valid flag if USBD_TRANSFER_DIRECTION_IN is also set 

svn path=/branches/usb-bringup-trunk/; revision=55222
2012-01-26 19:30:46 +00:00
Johannes Anderwald 8f792f3587 [USBCCGP]
- Implement querying device relations for FDO
- Implement creating device objects for each discovered function
- Invalidate device relations after the child pdo have been created
- Implement PDO device relations, most of query id, query device capabilities, start device
- USBCCGP should now initialize and create the child pdos
- Next is device control handling
- WIP, untested

svn path=/branches/usb-bringup-trunk/; revision=55219
2012-01-26 19:11:44 +00:00
Johannes Anderwald 2d7c9100e1 [USBCCGP]
- Query bus interface and check if USBC_DEVICE_CONFIGURATION_INTERFACE_V1 is supported. This interface is implemented by attached usb filter drivers and is used to enumerate functions of the composite usb device 
- Implement enumeration of function by using usb interface association descriptors and by the USBC_DEVICE_CONFIGURATION_INTERFACE_V1
- Needs audio legacy method and union function descriptors to be fully functional
- WIP, not yet tested
- Fix build with mingw by declaring _DISK_GEOMETRY_EX outside the function


svn path=/branches/usb-bringup-trunk/; revision=55197
2012-01-26 13:45:59 +00:00
Cameron Gutman b4c6fa3b4c [USBOHCI]
- Wait the required time for the port to be ready after powering it up

svn path=/branches/usb-bringup-trunk/; revision=55196
2012-01-26 04:35:04 +00:00
Johannes Anderwald 1cede4f077 [USBCCGP]
- Start implement USB Composite generic parent driver which is used for USB composite devices
- Start implement FDO initialization, needs to implement parsing of usb interface assocaition descriptor to complete FDO initialization

svn path=/branches/usb-bringup-trunk/; revision=55195
2012-01-26 03:42:56 +00:00
Cameron Gutman c60ff01cc6 [USBOHCI]
- Properly dismiss the enable status changed interrupt to avoid an interrupt storm after a device is disconnected

svn path=/branches/usb-bringup-trunk/; revision=55189
2012-01-26 01:46:06 +00:00
Cameron Gutman 334c9ed261 [USBEHCI]
- Fix GetPortStatus() and remove the cached status stuff (except for reset that we have to cache because the EHCI spec has no port reset complete bit)

svn path=/branches/usb-bringup-trunk/; revision=55188
2012-01-26 00:29:25 +00:00
Cameron Gutman e4cf28f086 [USBHUB_NEW]
- Revert r55167 now that OHCI is fixed
- USB drives attached to an OHCI controller before boot are now enumerated without a reconnect needed

svn path=/branches/usb-bringup-trunk/; revision=55187
2012-01-26 00:11:15 +00:00
Cameron Gutman bbd84c4171 [USBHUB_NEW]
- Remove the hacky way of determining if a device connect occurred (prone to all sorts of race conditions) and just always create a device since the only reason we reset right now is for a device connect

svn path=/branches/usb-bringup-trunk/; revision=55186
2012-01-26 00:02:03 +00:00
Cameron Gutman 23f71216c4 [USBOHCI]
- Fix and enable the proper GetPortStatus implementation
- Remove the old hacked cached port status mess

svn path=/branches/usb-bringup-trunk/; revision=55185
2012-01-25 23:56:29 +00:00
Johannes Anderwald 84e941632b [USBOHCI]
- Disable GetPortStatus implementation
- Fix build

svn path=/branches/usb-bringup-trunk/; revision=55182
2012-01-25 19:56:35 +00:00
Cameron Gutman 25d8cf82c9 [USBOHCI]
- Fix StartController() to perform initialization according to OHCI spec
- Fixes the infamous OHCI initialization hang on real hardware

svn path=/branches/usb-bringup-trunk/; revision=55181
2012-01-25 19:46:44 +00:00
Johannes Anderwald 219fac4641 [USBOHCI]
- Add alignment check

svn path=/branches/usb-bringup-trunk/; revision=55176
2012-01-25 18:56:56 +00:00
Johannes Anderwald 58dab5a63b [USBOHCI]
- No need to turn off interrupts 
- Check if bios is active
- Check for timeouts when resetting host controller

svn path=/branches/usb-bringup-trunk/; revision=55171
2012-01-25 09:50:04 +00:00
Cameron Gutman 6c55f96de8 [USBOHCI]
- Don't turn off interrupts before setting the OHCI_OWNERSHIP_CHANGE_REQUEST bit because it prevents the SMM driver from receiving the interrupt that tells it to give up ownership of the host controller
- This fix should be merged to Haiku also which has the same bug

svn path=/branches/usb-bringup-trunk/; revision=55170
2012-01-25 06:35:00 +00:00
Cameron Gutman 75676e7e49 [USBSTOR]
- Use the correct USBD_TRANSFER_DIRECTION value for write operations

svn path=/branches/usb-bringup-trunk/; revision=55169
2012-01-25 06:09:24 +00:00
Johannes Anderwald 40df6bbbe4 [USBHUB]
- Partly revert 55167, it conflicts with hotplugging

svn path=/branches/usb-bringup-trunk/; revision=55168
2012-01-25 04:00:33 +00:00
Johannes Anderwald a0dc4083ad [USBSTOR]
- Add debug trace
[USBOHCI]
- Implement proper GetPortStatus
[USBHUB]
- Reset all connected ports before sending first SCE
- USB Devices present before booting are now detected with OHCI controller. EHCI code is present but not yet activated

svn path=/branches/usb-bringup-trunk/; revision=55167
2012-01-25 03:39:57 +00:00
Cameron Gutman 6fab1a7c6a [USBSTOR]
- Fix a bug in SRB queuing

svn path=/branches/usb-bringup-trunk/; revision=55166
2012-01-25 01:46:35 +00:00
Cameron Gutman e3d0e34a18 [USBSTOR]
- Get the actual value for the removable media bit instead of hardcoding it to true

svn path=/branches/usb-bringup-trunk/; revision=55165
2012-01-25 01:09:59 +00:00
Cameron Gutman 131dbc69a7 [USBSTOR]
- Don't lie about removable media support for anything except hard drives

svn path=/branches/usb-bringup-trunk/; revision=55160
2012-01-25 00:03:18 +00:00
Cameron Gutman 11e87a17ea [USBSTOR]
- Rewrite pending SRB handling and change some behavior of the IRP queue
- The caller is no longer responsible for checking whether it can call USBSTOR_QueueNextRequest; frozen IRP queue and pending SRB are both handled for them
- It's no longer required for the caller of USBSTOR_QueueTerminateRequest to know whether the SRB was active (which was impossible before when handling a cancellation)
- Many potential race issues with IRP cancellation are eliminated
- Debugging hung SRBs is much easier now that pointer to the active one is stored in the FDO

svn path=/branches/usb-bringup-trunk/; revision=55157
2012-01-24 23:04:31 +00:00
Cameron Gutman 2f5db208de [USBSTOR]
- Fix broken IRP error handling and leaking memory

svn path=/branches/usb-bringup-trunk/; revision=55155
2012-01-24 22:28:44 +00:00
Cameron Gutman 75947d6708 [USBEHCI/USBOHCI]
- Handle invalid device handles gracefully instead of crashing

svn path=/branches/usb-bringup-trunk/; revision=55154
2012-01-24 22:21:30 +00:00
Cameron Gutman a65fd45042 [USBSTOR]
- Release the spinlock before returning (accidentally removed)

svn path=/branches/usb-bringup-trunk/; revision=55152
2012-01-24 21:33:51 +00:00
Johannes Anderwald 4f681bfe61 [USBEHCI]
- Display error status when host controller reports failure

svn path=/branches/usb-bringup-trunk/; revision=55149
2012-01-24 20:49:01 +00:00
Johannes Anderwald b4447be2c3 [USBHUB]
- Fix bugs introduced in 55134, 55135
- USB Mass Storage devices should now automatically install again

svn path=/branches/usb-bringup-trunk/; revision=55147
2012-01-24 17:00:30 +00:00
Cameron Gutman 94f1525447 [USBSTOR]
- Fix cancellation for IRPs that have already been dispatched for processing by IoStartNextPacket
- Don't complete IRPs with the IRP list lock held
- Clear the cancel routine before completing the IRP

svn path=/branches/usb-bringup-trunk/; revision=55138
2012-01-24 04:39:09 +00:00
Johannes Anderwald 3b70f619c8 [USBHUB]
- Add more checks for detecting composite device

svn path=/branches/usb-bringup-trunk/; revision=55135
2012-01-23 23:41:40 +00:00
Johannes Anderwald e62233a8e7 [USBHUB]
- Check if the device is a composite device
- Report USB\COMPOSITE as compatible id when a usb compsite device is detected

svn path=/branches/usb-bringup-trunk/; revision=55134
2012-01-23 23:29:54 +00:00
Johannes Anderwald 98731d6286 [USBOHCI]
- Fix warning
- Remove assert
[USBEHCI]
- Remove assert

svn path=/branches/usb-bringup-trunk/; revision=55122
2012-01-23 16:47:19 +00:00
Cameron Gutman eb6202bdb6 [USBEHCI]
- Remove unused variable

svn path=/branches/usb-bringup-trunk/; revision=55121
2012-01-23 16:29:43 +00:00
Johannes Anderwald fa3c4bb4eb [USBHUB]
- Silent traces

svn path=/branches/usb-bringup-trunk/; revision=55120
2012-01-23 16:25:43 +00:00
Cameron Gutman 1f321cafad [USB-BRINGUP-TRUNK]
- Allow surprise removal of HID devices
- Don't assemble useless empty resource lists

svn path=/branches/usb-bringup-trunk/; revision=55119
2012-01-23 16:22:43 +00:00
Johannes Anderwald 33e7325e17 [USBSTOR]
- Silent traces

svn path=/branches/usb-bringup-trunk/; revision=55118
2012-01-23 16:22:33 +00:00
Johannes Anderwald 88a17911fa [USBEHCI]
- Remove traces

svn path=/branches/usb-bringup-trunk/; revision=55117
2012-01-23 16:17:21 +00:00
Cameron Gutman 2e9bda4f63 [USB-BRINGUP-TRUNK]
- Store correct device power state for PowerSystemWorking

svn path=/branches/usb-bringup-trunk/; revision=55115
2012-01-23 16:06:32 +00:00
Cameron Gutman d55c9c5101 [USB-BRINGUP-TRUNK]
- Restore the frame interval register after a reset as per OHCI spec

svn path=/branches/usb-bringup-trunk/; revision=55112
2012-01-23 15:53:25 +00:00
Johannes Anderwald 8478147bbf [USBEHCI]
- Use the same lock in the IUSBQueue as in the IDMAMemoryManager
- add debug traces (default off)

svn path=/branches/usb-bringup-trunk/; revision=55110
2012-01-23 15:49:43 +00:00