Alexandre Julliard
088a787a2c
makefiles: Make -mno-cygwin the default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Zebediah Figura
1eb56b20ba
ntdll: Explicitly return whether an async is complete in async_callback_t.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:31:20 +02:00
Zebediah Figura
f5bd946399
kernelbase: Don't set the output size in DeviceIoControl() if the NT status denotes error.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:44 +02:00
Zebediah Figura
cc7e3ec8e2
server: Create pseudo-fds as initially signaled.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:29 +02:00
Chip Davis
7c0f642005
ntoskrnl: Always copy the output buffer for non-buffered ioctls.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30155
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:25 +02:00
Zebediah Figura
5af74129bd
ntdll: Do not fill the IOSB if a device IRP failed synchronously.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:17 +02:00
Rémi Bernon
757325bf77
ntoskrnl.exe/tests: Fix inverted winetest_win_skip condition.
...
And change skipped test message. It's not really useful and it will fail
the tests if the main test summary doesn't match the number of skipped
messages.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:34:12 +02:00
Zebediah Figura
4a73fbbd40
server: Do not signal completion if the async failed synchronously.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:33:22 +02:00
Zebediah Figura
097685aa9e
ntoskrnl: Report separately whether an IRP was marked pending.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:33:19 +02:00
Zebediah Figura
484b78bda0
ntoskrnl: Report the initial status of an IRP separately from the IOSB status.
...
Based on a patch by Chip Davis.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30155
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:32:18 +02:00
Zebediah Figura
69ea35a954
ntoskrnl: Report IRP completion via get_next_device_request if possible.
...
Although there is arguably an advantage to saving a server request, the impetus
for this patch is make it easier for the server to process the IRP return status
before (or at the same time as) it processes the IOSB status. This allows
simpler handling of the case where the IRP handler returns STATUS_PENDING but
completes the IRP before returning.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:31:17 +02:00
Rémi Bernon
6aef301e08
dinput8/tests: Move HID driver tests from ntoskrnl.exe.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura
a1c42293a2
server: Don't wake up always-blocking asyncs.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura
0f7c784fb7
ntoskrnl/tests: Test a pending NtQueryVolumeInformation call on an overlapped file handle.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura
32347fcf08
server: Queue a cancel IRP in the device file cancel_async callback.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura
298a1b296b
server: Move the STATUS_ALERTED logic from async_request_complete() to async_terminate().
...
In particular, don't mark asyncs with output data as "alerted", i.e.
restartable.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 10:23:12 +02:00
Zebediah Figura
7b9617ef2f
kernelbase: Return TRUE from DeviceIoControl() if the NT status denotes success.
...
Likely a similar treatment should be given to other kernelbase APIs, but it's
not immediately clear which.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:38 +02:00
Zebediah Figura
8d37962b43
ntoskrnl/tests: Add more tests for IRP status handling.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:27:22 +02:00
Alistair Leslie-Hughes
5aec01a7af
ntoskrnl.exe: Implement PsGetCurrentProcessSessionId.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36887
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 18:06:29 +02:00
Rémi Bernon
74b7845ff0
hid: Implement HidP_SetScaledUsageValue.
...
The function seems to actually do overflows and rounding errors.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Rémi Bernon
3b40a03267
hid: Implement HidP_UnsetUsages.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Rémi Bernon
b117f6548a
hidclass.sys: Fix nary usage collections index ordering.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Rémi Bernon
6b504fe778
ntoskrnl.exe/tests: Add more HID usage nary tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget
87a42df9f7
ntoskrnl.exe: Fix the spelling of some comments.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Zebediah Figura
2f08e95b4b
ntoskrnl: Clear the pending flags for the current stack location before calling the previous location's completion routine.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 22:03:21 +02:00
Zebediah Figura
14d1855a0c
ntoskrnl: Set the PendingReturned field in IoCompleteRequest().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 22:03:19 +02:00
Zebediah Figura
b332f96208
ntoskrnl/tests: Add some tests for IRP pending flags.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 22:03:16 +02:00
Alistair Leslie-Hughes
16a7976de9
ntdll: Add NtTraceControl/ZwTraceControl stubs.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 10:49:13 +02:00
Zebediah Figura
4970266a70
ntoskrnl: Factor out remove_device().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:57:09 +02:00
Zebediah Figura
e56e4f97a4
ntoskrnl: Dereference the device children in IoDeleteDevice().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:57:05 +02:00
Rémi Bernon
286999a9ea
hidclass.sys: Enforce POLL_FREQUENCY_MSEC value range.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-16 23:27:21 +02:00
Rémi Bernon
b36b2999c8
hid: Return HIDP_STATUS_SUCCESS even if no usages are found.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Alex Henrie
c5c9c58974
ntoskrnl: Add MmGetPhysicalAddress semi-stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47047
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 19:58:31 +02:00
Rémi Bernon
ae01a6f6ad
ntoskrnl.exe/tests: Restore default mute threshold.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Rémi Bernon
3a3e0ed2e9
hidclass.sys: Create separate report queue for each opened handle.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Rémi Bernon
94e5945102
hidclass.sys: Rewrite IOCTL_HID_WRITE_REPORT using hid_device_xfer_report.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 11:41:45 +02:00
Rémi Bernon
e653a2e0b3
hidclass.sys: Validate report IDs in hid_device_xfer_report.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 11:41:36 +02:00
Rémi Bernon
3708bae09b
hidclass.sys: Use hid_device_xfer_report for IOCTL_HID_SET_FEATURE.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:47 +02:00
Rémi Bernon
25409b899c
hidclass.sys: Return STATUS_INVALID_USER_BUFFER if buffer_len is 0.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:44 +02:00
Rémi Bernon
98c512e026
hidclass.sys: Pass sizeof(packet) as input for IOCTL_HID_SET_OUTPUT_REPORT.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:41 +02:00
Rémi Bernon
ada3ec64a6
hidclass.sys: Use hid_device_xfer_report for IOCTL_HID_SET_OUTPUT_REPORT.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:37 +02:00
Rémi Bernon
a2c902e68d
ntoskrnl.exe/tests: Wait for second report first.
...
And increasing the polling period, so that first queued read is unlikely
to complete before we queued the second one.
This was meant to test that all pending reads are satisfied at once
after a poll, but it causes some spurious failures as they aren't
satisfied atomically (especially on Wine). As there's an increasing seq
counter in each poll it should be enough to compare the report data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:31 +02:00
Rémi Bernon
6fd356e009
hidclass.sys: Introduce new hid_device_xfer_report helper.
...
From HID_IOCTL_GET_INPUT_REPORT code, to factor report buffer transfer,
and use it for HID_IOCTL_GET_FEATURE.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon
1f3fdb3cb6
hidclass.sys: Adjust buffer length according to report IDs usage.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon
e8c6f13071
hidclass.sys: Always copy InputReportByteLength bytes into read buffer.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon
ecf6a16b8e
hidclass.sys: Return irp->IoStatus.Information from minidriver.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon
a8ab0fe08f
hidclass.sys: Return STATUS_INVALID_PARAMETER when appropriate.
...
Instead of STATUS_BUFFER_TOO_SMALL when input report buffer length is
less than InputReportByteLength.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon
9c5ab964e9
hidclass.sys: Return STATUS_INVALID_USER_BUFFER when appropriate.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon
7096c26a2e
hidclass.sys: Implement button array value caps.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon
76b4d09afd
ntoskrnl.exe/tests: Add some tests with concurrent reads in polled mode.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00