Thomas Faber
71a4462ad5
[USBCCGP] Ignore IRP_MN_REMOVE_DEVICE return status and don't wait for it to complete.
2020-05-01 12:05:12 +02:00
Thomas Faber
823101274a
[USBCCGP] Don't handle IRP_MN_QUERY_DEVICE_TEXT requests other than device description.
2020-05-01 12:05:11 +02:00
Thomas Faber
0d15b2a3cb
[USBCCGP] Correctly stub PDO power IRP handling.
2020-05-01 12:05:11 +02:00
Thomas Faber
6c3a10c55a
[USBCCGP] Always forward device relations IRPs.
2020-05-01 12:05:06 +02:00
Victor Perevertkin
019f21ee1d
[MEDIA][CMAKE] Create add_driver_inf cmake function
...
*.inf files for drivers can now be placed along with the driver code
2020-04-26 20:28:04 +03:00
Eric Kohl
7bef5b882a
[USBSTOR] Add missing compatible device id 5
2020-04-10 13:41:01 +02:00
Eric Kohl
bac4e185fb
[USBHUB] Set the Removable flag for all ports of a USB hub
2020-03-21 13:23:21 +01:00
Joachim Henze
23f6b36174
[USBHUB] Demote a DbgBreakPoint CORE-16394
...
The DbgBreakPoint() was reported to be continuable without
obvious side-effects by Doug Lyons.
Thank you for your tests Doug.
To prevent what end-users may otherwise perceive as a
freeze-regression caused by enabling the new driver in
0.4.13-dev-1048-g
6392c5a78c
2020-03-10 22:48:02 +01:00
Thomas Faber
67b3b73d82
[USBHUB] Partially implement USBH_ProcessHubStateChange. CORE-16704
2020-03-02 20:47:01 +01:00
Thomas Faber
76a075867e
[USBHUB] Fix recipient in USBH_SyncClearPortStatus. CORE-16704
2020-03-02 20:46:56 +01:00
Thomas Faber
f32e1acd3c
[USBHUB] Only break into the debugger in the case that is actually unimplemented. CORE-16394
2020-02-01 13:17:30 +01:00
Oleg Dubinskiy
611d925d32
[USB] Update the names of new USB drivers
2020-01-06 21:16:08 +02:00
Oleg Dubinskiy
83c07f4e4c
[SDK][USB] Delete old USB drivers and libusb
2020-01-06 21:16:08 +02:00
Victor Perevertkin
23147330dd
[USBOHCI] Use KeQueryTickCount for timeouts instead of KeQuerySystemTime
2019-12-16 03:21:28 +03:00
Serge Gautherie
ed9f0dca14
[USBPORT] USBPORT_InvalidateEndpointHandler(): Properly enumerate endpoints
2019-09-29 13:39:12 +03:00
Victor Perevertkin
88cf5b0a3c
[USB] Enable *_new usb stack
2019-08-20 01:34:58 +03:00
Victor Perevertkin
fc14c095f5
[USBPORT] Fix endless loop, occasionally happened on real hardware
2019-08-20 01:30:52 +03:00
Victor Perevertkin
90b8646790
[USBOHCI_NEW] Fix unused variable
2019-08-16 20:37:11 +03:00
Stanislav Motylkov
2a8fc2b411
[USBOHCI_NEW] Refactor OHCI_AbortTransfer function
...
- Added SAL annotation
- Simplified local variables
- Replace counterintuitive `do {} while ()` loops with nice `for` loops
- Get rid of goto and its label, it can be simply avoided
2019-08-16 19:08:04 +02:00
Oleg Dubinskiy
47303268e1
[USBAUDIO] Fix compilation issues
2019-08-03 14:55:57 +02:00
Victor Perevertkin
e831f8530b
[USBSTOR] Do not print device descriptor by default.
...
Add SrbGetCdb macro
2019-06-25 19:04:20 +03:00
Victor Perevertkin
10260f40d9
[USBOHCI_NEW] Rename counter-intuitive field of Transfer Descriptor
2019-06-25 15:14:21 +03:00
Victor Perevertkin
9004e64b57
[USBOHCI_NEW] Zero out the transfer descriptor right after allocation.
...
Cleaned up transfer routines and added some more docs.
2019-06-25 15:03:26 +03:00
Victor Perevertkin
3fe397818a
[USBOHCI_NEW] Simplify the MapTransferToTD routine and add some docs
2019-06-25 13:02:35 +03:00
Victor Perevertkin
da1b08e842
[USBSTOR] Properly handle IRP_MN_QUERY_DEVICE_RELATIONS(BusRelations) for FDO.
...
This fixes Driver Verifier warnings
2019-06-11 04:39:43 +03:00
Victor Perevertkin
04409942d6
[USBSTOR] Register dumb IRP_MJ_SYSTEM_CONTROL handler.
...
This satisfies Driver Verifier
2019-06-11 04:39:43 +03:00
Victor Perevertkin
126abaf88f
[USBSTOR] Improve handling of IRP_MN_QUERY_DEVICE_TEXT for PDOs
...
CORE-15883
2019-06-11 04:39:43 +03:00
Victor Perevertkin
40b25634ff
[USBSTOR] Do not leak fields of DeviceExtensions upon device removal
2019-06-11 04:39:43 +03:00
Victor Perevertkin
b7de5870e6
[USBSTOR] Weaken the type checks of a device.
...
This adds usb-cdrom support to usbstor.sys
2019-06-11 04:39:43 +03:00
Victor Perevertkin
7bb93db372
[USBSTOR] Refactor device reset and pipe reset code.
...
Return correct status codes from completion routines.
Reject requests while the device is being reset
2019-06-11 04:39:43 +03:00
Victor Perevertkin
aaa90f6986
[USBSTOR] Do not try to retry a failed request
...
for all cases except receiving a USBD_STATUS_STALL_PID status.
This decision should be made by higher-level driver (and classpnp drivers do it)
2019-06-11 04:39:43 +03:00
Victor Perevertkin
c7ed299aaa
[USBSTOR] Issue a SCSI Request Sense after receiving
...
a CSW with failed status. CORE-15884
Based on Vadim Galyant's patches to usbstor
2019-06-11 04:39:43 +03:00
Victor Perevertkin
5046f1b3fa
[USBSTOR] Keep CBW and CSW inside an IRP context.
...
Remove obsolete fields from the IRP context structure.
2019-06-11 04:39:43 +03:00
Victor Perevertkin
c452f7dab4
[USBSTOR] Refactor request issue code.
...
Pipe handle selection now made more correctly.
Simplified an MDL allocation for a request.
2019-06-11 04:39:43 +03:00
Victor Perevertkin
84f78cb0d7
[USBSTOR] Better handle CBW/CSW transfer errors
...
and set SrbStatus correctly.
2019-06-11 04:39:43 +03:00
Victor Perevertkin
3faf5efd49
[USBSTOR] Better validate SCSI IRPs.
...
Patch by Vadim Galyant
2019-06-11 04:39:43 +03:00
Victor Perevertkin
f3fd12b9be
[USBSTOR] Rework the routines for sending internal SCSI requests.
...
Now for each request SenseBuffer is correctly set
and 3 attempts are made to be sure the STALL state is cleared and
the error is in something else.
Remove the usage of UFI_INQUIRY_DATA structure in favor of "standard"
INQUIRYDATA structure from scsi.h
Based in Vadim Galyant's patches to usbstor
2019-06-11 04:39:43 +03:00
Victor Perevertkin
ed6724cd7e
[USBSTOR] Do not create a new Irp for USB requests - use the original one
...
from higher-level driver instead.
Refactored CSWCompletionRoutine for correct handling different CSW
statuses, more work to be done here.
2019-06-11 04:39:43 +03:00
Victor Perevertkin
b4c03399ba
[USBSTOR] Do not attempt additional processing of SCSI requests.
...
Now the driver sends all requests transparently.
Inspired by Vadim Galyant's patches to usbstor
2019-06-11 04:39:43 +03:00
Victor Perevertkin
d17d15ab6c
[FORMATTING][USBSTOR] Remove Captain Obvious and line-wasting comments.
...
Now the driver conforms with our current Coding Style.
No functional changes
2019-06-11 04:39:43 +03:00
Thomas Faber
a7634b8e1d
[USBHUB_NEW] Support NULL HubExtension in USBH_PdoRemoveDevice.
...
Device removal can happen multiple times for PDOs.
2019-04-14 15:32:18 +02:00
Thomas Faber
477cf902e4
[USBHUB_NEW] Fix inverted check in USBH_RestoreDevice.
...
This allows re-enabling a disabled device.
2019-04-14 15:32:16 +02:00
Thomas Faber
46b0f6d9de
[USBCCGP] Allow unconfiguring the device in USBCCGP_PDOSelectConfiguration.
...
Fixes device removal for USB audio devices.
2019-04-14 15:32:14 +02:00
Thomas Faber
528fc589c0
[USBCCGP] Do not try to unconfigure a device that is not configured.
...
Fixes handling failed IRP_MN_START_DEVICE.
2019-04-14 15:32:12 +02:00
Jérôme Gardou
23373acbb9
[CMAKE] Use modules instead of shared libraries
...
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.
On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Thomas Faber
fc9d5d2f55
[USBUHCI_NEW] Fix an infinite loop.
2019-03-11 08:54:03 +01:00
Thomas Faber
026a12fe39
[USBPORT] Implement interface setting in USBPORT_OpenInterface.
2019-03-11 08:54:01 +01:00
Thomas Faber
ac20ab031c
[USBPORT] Correctly handle alternate settings returned from USBPORT_ParseConfigurationDescriptor.
...
The last parameter of USBPORT_ParseConfigurationDescriptor is a pointer
to a boolean indicating whether any alternate interface settings were
found for the specified interface.
Interpreting it as an alternate setting value, as we did before,
would always override the alternate setting to '1' (if any alternate
descriptors were present), therefore selecting the wrong interface
setting, and possibly causing a buffer overflow on the InterfaceList's
Pipes array.
Found by Special Pool.
2019-03-11 08:53:55 +01:00
Thomas Faber
36c1cb0910
[USBPORT] Correctly find interface descriptor in USBPORT_ParseConfigurationDescriptor
...
There can be other descriptors between the config descriptor and the
first interface descriptor, so we specifically need to check for
the interface descriptor type and skip anything before that.
We also need to guard against bLength == 0, which would cause an
infinite loop, instead of doing a second bDescriptorType check.
2019-03-11 08:53:53 +01:00
Thomas Faber
1946f6bb25
[USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe.
2019-03-11 08:53:52 +01:00