Commit Graph
2057 Commits
Author SHA1 Message Date
Marco Trevisan (Treviño) a6240828c1 tests/egis_etu905: Actually test the device identify cancellation path 2026-07-25 21:21:50 +00:00
Jason HuangandMarco Trevisan 68aa38ed9d egis_etu905: Fix cancel operation to trigger template update 2026-07-25 21:21:50 +00:00
Marco Trevisan (Treviño) b8154bf466 egis_etu905: Handle cancel as part of the device SSM return
Cancelling an operation does allow the driver to do perform async ops
at the moment, but rather we are supposed to just send the the cancel
commands while another action may running.

So we should handle this as part of the SSM final stage, if cancellation
happened.
2026-07-25 21:21:50 +00:00
Marco Trevisan (Treviño) 4bc5213e08 egis_etu905: Split cancellable handling in commands
cancel command cannot be cancellable, while we want others to be, so
let's split the two cases, and handle them separately
2026-07-25 21:21:50 +00:00
Jason HuangandMarco Trevisan c45781cf17 egis_etu905: support template update after identify/verify
Add IDENTIFY_SEND_CANCEL_RESULT state to send cancel command
after identify/verify completes, triggering firmware template update.
Implement cancel() callback for enroll and identify/verify cancellation.
Updated umockdev test data to cover the new flow.
2026-07-25 21:21:50 +00:00
Jason HuangandMarco Trevisan 84a33b7d59 fpi-usb-transfer: Avoid hex dump on cancelled transfers
When a USB transfer is cancelled, actual_length is set to -1. This
gets implicitly cast to gsize (unsigned) in log_transfer(), resulting
in a huge length passed to fp_dbg_hex_dump_data() and causing a
segfault.

Only dump data when the length is within valid bounds.
2026-07-25 21:21:50 +00:00
Marco Trevisan (Treviño) de5d539b50 fpi-device: Use the error quark string to debug unknown error domains 2026-07-25 21:21:50 +00:00
Marco Trevisan (Treviño) 1b589a9245 fpi-device: Add more specific debug info for usb errors 2026-07-25 21:21:50 +00:00
Marco Trevisan (Treviño) 91012c3690 ci: Use ninja to generate coverage files
meson compile -C <build-dir> coverage is not a thing

See: https://github.com/mesonbuild/meson/issues/7895
2026-07-24 17:58:18 +02:00
Marco Trevisan (Treviño) 157ec7e544 fp-device: Add debug for task cancellation requests 2026-07-24 10:54:02 +00:00
Marco Trevisan (Treviño) d938dc0278 mafpmoc: Remove unused cancel vfunc 2026-07-24 10:54:02 +00:00
Marco Trevisan (Treviño) dcf37cf476 egismoc: Remove unneeded length definitions 2026-07-24 10:54:02 +00:00
Marco Trevisan (Treviño) ebb4b058b4 egis_etu905: Remove unneeded length definitions 2026-07-24 10:54:02 +00:00
Benjamin BergandMarco Trevisan 1a5fc6e4d5 egis_etu905: move commands into read-only memory
There is no need for them to be writable and with the previous commit
this change will also not result in any compiler warnings. Simply change
all of the static definitions to be static const.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
2026-07-24 10:54:02 +00:00
Benjamin BergandMarco Trevisan f5955e7cb5 egis_etu905: use const buffer for egis_etu905_exec_cmd command
The function only uses the passed command as a const buffer and makes a
copy immediately. As such, there is also no need for a destroy callback
as the caller can simply clean up afterwards.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
2026-07-24 10:54:02 +00:00
Marco Trevisan (Treviño) f3d17a24f9 egis_etu905: Decouple SSM and command data from device
While most of commands should run separated, others such as cancellation
can run concurrently so we cannot share command data in the device
structure, but it has to be rather per command.

Move it there
2026-07-24 10:54:02 +00:00
Marco Trevisan (Treviño) ffdb0a84b8 ci/build: Use meson compile rather than ninja 2026-07-24 10:44:26 +00:00
Marco Trevisan (Treviño) 1b9bee4b6d build: Use run_target for sync-udev-hwdb 2026-07-24 10:44:26 +00:00
Marco Trevisan (Treviño) c890325589 build: Add dist check script that checks if there are unsupported devices 2026-07-24 10:44:26 +00:00
Marco Trevisan (Treviño) 5113f7ec3b ci: Use sync unsupported devices tool to check for diffs 2026-07-24 10:44:26 +00:00
Marco Trevisan (Treviño) b72feabc58 build: Add script to update the unsupported devices from wiki
Avoid some more manual labor
2026-07-24 10:44:26 +00:00
Marco Trevisan (Treviño) 833d39ab59 aes2550: Complete deactivation from dev_deactivate on broken loops
The driver relied on a running finger-detection or capture callback to
observe the deactivating flag and call complete_deactivation(). When the
async loop was broken by a session error from a terminal callback (such
as capture_sm_complete), no further iteration was left to notice the
flag, so the deactivation never completed.

Rather than scatter complete_deactivation() calls after every
fpi_image_device_session_error(), track whether an operation is actually
pending with an "active" flag and let dev_deactivate() complete the
request itself when nothing is in flight.

This keeps the deactivation lifecycle owned by dev_deactivate.
2026-07-23 14:36:02 +02:00
Marco Trevisan (Treviño)andShengyu Qu 87a7023831 aes2550: Add basic test to check too-short errors
Traces provided by Shengyu Qu

Co-Authored-By: Shengyu Qu <wiagn@4d2.org>
2026-07-23 14:36:02 +02:00
Marco Trevisan (Treviño) 44f3bbc43a build: Allow to run umockdev tests separately 2026-07-23 14:36:02 +02:00
Marco Trevisan (Treviño) fc9fd638a8 tests/umocdev-test: Allow to run just one test at time 2026-07-23 14:36:02 +02:00
Marco Trevisan (Treviño) c02d58a369 tests/create-driver-test: Use argparse and allow to record only one case 2026-07-23 14:36:02 +02:00
Marco Trevisan (Treviño) 71cff7966e tests/create-driver-tests.py: Allow to create both capture and custom tests
A device may provide both tests, so let's make this easier to achieve
2026-07-23 13:08:54 +02:00
Shengyu Qu 56516db045 tests: Add aes2550 driver replay test
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
2026-07-23 18:40:35 +08:00
Shengyu Qu 20debe2ee4 drivers: aes2550: handle tapping without swiping
When tapping on the sensor rather than swiping through it, super RSR will
drop slices with 0-3 pixels of Y motion. In such case, self->strips_len is
zero and causing protocol error. Handle such cases by calling for a re-scan.

Closes: https://gitlab.freedesktop.org/libfprint/libfprint/-/work_items/786
Assisted-by: DeepSeek:deepseek-v4-pro-preview
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
2026-07-21 21:57:50 +08:00
Shengyu Qu 56edcf7802 drivers: aes2550: fix lacking deactivation callback
In some cases, the driver generates error, but complete_deactivation() is not
called after calling fpi_image_device_session_error(). In this case, fprintd
would be waiting for fpi_image_device_deactivate_complete() forever. Fix by
adding calls for complete_deactivation();

Closes: https://gitlab.freedesktop.org/libfprint/libfprint/-/work_items/786
Assisted-by: DeepSeek:deepseek-v4-pro-preview
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
2026-07-21 21:53:51 +08:00
Vincent Huang ecb975052d synaptics: add new PIDs 0x10D 0x10E 2026-07-15 11:38:54 +08:00
Marco Trevisan (Treviño) 6df065c399 Revert "fpi-print: Add function to check if two prints match"
This reverts commit b4d78e7c0f.
2026-07-13 12:10:21 +02:00
Marco Trevisan (Treviño) 323d8c3f85 fpi-device: Do not check for scanned prints equalty on NBIS prints
We cannot assume that two NBIS prints are matching without going through
proper NBIS checks, so we cannot do a check on the scanned print without
an extra thread, which is rather an overkill.

So let's just do the check for prints we can actually compare (raw ones
for now)
2026-07-13 12:09:36 +02:00
Marco Trevisan (Treviño) 73f641344b fpi-print: Expose a method to get the internal print type
We could use the property, but a getter is handier to use
2026-07-13 12:09:35 +02:00
Marco Trevisan (Treviño) 0abe22bd94 virtual-image: Do print enroll and verification using transformed images
We used to enroll and verify always the same prints, which made
generating the very same enrolled prints, that simplifies the libfprint
matching.

To make this a bit more real, let's apply some transformations to the
print images before sending them each time
2026-07-13 11:24:10 +02:00
Marco Trevisan (Treviño) 973aa65d4c vfs301: Handle unexpected data length gracefully 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 7f9504afd5 vfs301: Fix error handling on peeking events 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 98891dc042 vfs301: Handle a read failure as a protocol error 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) ba6f87584a vfs101: Prevent a division by zero 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 62c8554dac vfs101: Fix an use-after-free issue 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 2aa415f233 upekts: Validate inner length value before using it 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 5ccf66dd2c realtek: Do not check for negative values for gsize 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 873bca59ee realtek: Consider any non-success status as a failure during enroll 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 0a446df6f9 realtek: Handle missing missing or invalid templates as errors 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 2a4e68d64a elanmoc: Do not pass NULL error to SSM mark failed
The error has been already checked and it's null here, so we need to
return a new error
2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 2dee163512 elan: Prevent division by zero 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) db316a59f4 elan: Use safer check on linear frame processing 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 0ca34709cd egismoc: Add bounds check to validate responses 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) c30f767887 aesx660: Ignore oversized payloads 2026-07-13 08:13:46 +00:00
Marco Trevisan (Treviño) 215974f211 aesx660: Fix strips leak 2026-07-13 08:13:46 +00:00