Victor Perevertkin
f722be93d5
[USBSTOR] Enable USB (ATAPI) cdroms
...
With the cdrom_new driver, they now work
CORE-16112
2020-12-06 02:08:32 +03:00
Victor Perevertkin
cbe88e287f
[USBSTOR][SCSIPORT] Use STORAGE_ADAPTER_DESCRIPTOR from WIN8
...
This way, these drivers are more compatible with classpnp and cdrom used
by ReactOS (and don't fire asserts)
2020-12-06 01:57:56 +03:00
Jérôme Gardou
d6ea8659c8
[CMAKE] Get rid of the set_cpp macro
...
Instead of messing with global variables and the like, we introduce two target properties:
- WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
- WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
- cpprt: for C++ runtime routines
- cppstl: for the C++ standard template library
NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++
Finally, we manage the relevant flags with the ad-hoc generator expressions
So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
2020-10-20 21:44:54 +02:00
Victor Perevertkin
1e512e29dc
[USBSTOR] Correctly terminate a REG_MULTI_SZ string
...
returned by the IRP_MN_QUERY_ID handler
2020-06-24 21:15:58 +03:00
Victor Perevertkin
2540c3b1e8
[USBSTOR] Fix unused variable introduced in 94e61c3
2020-06-13 03:20:08 +03:00
Victor Perevertkin
493f2ace11
[USBSTOR] Fix wrong function name in a9b97ae
2020-06-13 03:07:00 +03:00
Victor Perevertkin
94e61c3080
[USBSTOR] Move PDO's Inquiry data and FDO's SCSI context
...
to their Device Extensions.
This way the driver can better handle low memory situations
2020-06-12 16:55:27 +03:00
Victor Perevertkin
a9b97aeded
[USBSTOR] General refactoring.
...
Remove unused structures and unused fields in device extensions.
Replaced magic numbers with constants
2020-06-12 16:55:27 +03:00
Amine Khaldi
139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
2020-06-06 21:58:41 +03:00
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