mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
Compare commits
11 Commits
benzea/sep
...
v1.94.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
909865ed8d | ||
|
|
39333a0642 | ||
|
|
4340be728c | ||
|
|
dba5ca5535 | ||
|
|
2a70cd7e02 | ||
|
|
3108ac3144 | ||
|
|
c928d7bd8f | ||
|
|
ec42b2ade1 | ||
|
|
4edfa48608 | ||
|
|
1a5df96751 | ||
|
|
62448492af |
12
NEWS
12
NEWS
@@ -1,6 +1,18 @@
|
||||
This file lists notable changes in each release. For the full history of all
|
||||
changes, see ChangeLog.
|
||||
|
||||
2021-06-30: v1.94.0 release
|
||||
|
||||
Highlights:
|
||||
* Implement suspend/resume handling including USB wakeup configuration.
|
||||
This requires writing the "persist" and "wakeup" sysfs attributes.
|
||||
* Add simple temperature module to prevent devices from becoming too hot
|
||||
* Add feature for continuous scanning
|
||||
* New internal "critical section" API to simplify driver development
|
||||
* elan: new PID 0x0c58
|
||||
* elanmoc: Fixes for multi-user handling and FW changes
|
||||
* virtual-device: Do not time out for SCAN command
|
||||
|
||||
2021-06-30: v1.92.1 release
|
||||
|
||||
Highlights:
|
||||
|
||||
@@ -245,6 +245,7 @@ usb:v06CBp00C4*
|
||||
usb:v06CBp00CB*
|
||||
usb:v06CBp00D8*
|
||||
usb:v06CBp00DA*
|
||||
usb:v06CBp00E7*
|
||||
usb:v06CBp00E9*
|
||||
usb:v0A5Cp5801*
|
||||
usb:v0A5Cp5805*
|
||||
|
||||
@@ -50,6 +50,8 @@ fp_device_capture
|
||||
fp_device_delete_print
|
||||
fp_device_list_prints
|
||||
fp_device_clear_storage
|
||||
fp_device_suspend
|
||||
fp_device_resume
|
||||
fp_device_open_finish
|
||||
fp_device_close_finish
|
||||
fp_device_enroll_finish
|
||||
@@ -59,6 +61,8 @@ fp_device_capture_finish
|
||||
fp_device_delete_print_finish
|
||||
fp_device_list_prints_finish
|
||||
fp_device_clear_storage_finish
|
||||
fp_device_suspend_finish
|
||||
fp_device_resume_finish
|
||||
fp_device_open_sync
|
||||
fp_device_close_sync
|
||||
fp_device_enroll_sync
|
||||
@@ -68,6 +72,8 @@ fp_device_capture_sync
|
||||
fp_device_delete_print_sync
|
||||
fp_device_list_prints_sync
|
||||
fp_device_clear_storage_sync
|
||||
fp_device_suspend_sync
|
||||
fp_device_resume_sync
|
||||
FpDevice
|
||||
</SECTION>
|
||||
|
||||
@@ -160,6 +166,8 @@ fpi_device_add_timeout
|
||||
fpi_device_set_nr_enroll_stages
|
||||
fpi_device_set_scan_type
|
||||
fpi_device_update_features
|
||||
fpi_device_critical_enter
|
||||
fpi_device_critical_leave
|
||||
fpi_device_remove
|
||||
fpi_device_report_finger_status
|
||||
fpi_device_report_finger_status_changes
|
||||
@@ -172,10 +180,12 @@ fpi_device_verify_complete
|
||||
fpi_device_identify_complete
|
||||
fpi_device_capture_complete
|
||||
fpi_device_delete_complete
|
||||
fpi_device_list_complete
|
||||
fpi_device_suspend_complete
|
||||
fpi_device_resume_complete
|
||||
fpi_device_enroll_progress
|
||||
fpi_device_verify_report
|
||||
fpi_device_identify_report
|
||||
fpi_device_list_complete
|
||||
fpi_device_class_auto_initialize_features
|
||||
</SECTION>
|
||||
|
||||
|
||||
@@ -331,7 +331,8 @@ elanmoc_reenroll_cb (FpiDeviceElanmoc *self,
|
||||
if ((self->curr_enrolled == (ELAN_MAX_ENROLL_NUM + 1)) && (buffer_in[1] == 0x00))
|
||||
{
|
||||
fp_warn ("elanmoc_reenroll_cb over enroll max");
|
||||
fpi_ssm_mark_completed (self->task_ssm);
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new (FP_DEVICE_ERROR_DATA_FULL));
|
||||
return;
|
||||
}
|
||||
if (buffer_in[1] == 0x00)
|
||||
@@ -431,7 +432,7 @@ elan_enroll_run_state (FpiSsm *ssm, FpDevice *dev)
|
||||
case MOC_ENROLL_REENROLL_CHECK:
|
||||
data = fpi_ssm_get_data (ssm);
|
||||
cmd_buf = elanmoc_compose_cmd (&elanmoc_check_reenroll_cmd);
|
||||
cmd_buf[4] = data[16];
|
||||
memcpy (cmd_buf + 3, data, ELAN_USERDATE_SIZE);
|
||||
elanmoc_get_cmd (dev, cmd_buf, elanmoc_check_reenroll_cmd.cmd_len, elanmoc_check_reenroll_cmd.resp_len, 0, elanmoc_reenroll_cb);
|
||||
break;
|
||||
|
||||
@@ -688,7 +689,10 @@ identify_status_report (FpiDeviceElanmoc *self, int verify_status_id,
|
||||
|
||||
if (error)
|
||||
{
|
||||
fpi_device_enroll_complete (device, NULL, error);
|
||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||
fpi_device_verify_complete (device, error);
|
||||
else
|
||||
fpi_device_identify_complete (device, error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ G_DECLARE_FINAL_TYPE (FpiDeviceElanmoc, fpi_device_elanmoc, FPI, DEVICE_ELANMOC,
|
||||
#define ELAN_EP_MOC_CMD_IN (0x4 | LIBUSB_ENDPOINT_IN)
|
||||
#define ELAN_EP_IMG_IN (0x2 | LIBUSB_ENDPOINT_IN)
|
||||
|
||||
#define ELAN_MOC_CMD_TIMEOUT 2000
|
||||
#define ELAN_MOC_CMD_TIMEOUT 5000
|
||||
#define ELAN_MOC_CAL_RETRY 500
|
||||
#define ELAN_MOC_ENROLL_TIMES 9
|
||||
#define ELAN_MAX_USER_ID_LEN 92
|
||||
@@ -135,7 +135,7 @@ static const struct elanmoc_cmd elanmoc_set_mod_cmd = {
|
||||
|
||||
static const struct elanmoc_cmd elanmoc_check_reenroll_cmd = {
|
||||
.cmd_header = {0x40, 0xff, 0x22},
|
||||
.cmd_len = 5,
|
||||
.cmd_len = 3 + ELAN_USERDATE_SIZE,
|
||||
.resp_len = 2,
|
||||
};
|
||||
|
||||
|
||||
@@ -1348,8 +1348,12 @@ fps_deinit_cb (FpiDeviceSynaptics *self,
|
||||
bmkt_response_t *resp,
|
||||
GError *error)
|
||||
{
|
||||
g_autoptr(GError) err = NULL;
|
||||
|
||||
/* Release usb interface */
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (self)), 0, 0, &error);
|
||||
g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (self)), 0, 0, &err);
|
||||
if (!error)
|
||||
error = g_steal_pointer (&err);
|
||||
|
||||
g_clear_object (&self->interrupt_cancellable);
|
||||
|
||||
|
||||
@@ -67,12 +67,17 @@ dev_identify (FpDevice *dev)
|
||||
new_scan,
|
||||
(GEqualFunc) fp_print_equal,
|
||||
NULL))
|
||||
error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND);
|
||||
{
|
||||
match = FALSE;
|
||||
g_clear_object (&new_scan);
|
||||
}
|
||||
else if (g_ptr_array_find_with_equal_func (prints,
|
||||
new_scan,
|
||||
(GEqualFunc) fp_print_equal,
|
||||
&idx))
|
||||
match = g_ptr_array_index (prints, idx);
|
||||
{
|
||||
match = g_ptr_array_index (prints, idx);
|
||||
}
|
||||
|
||||
if (!self->match_reported)
|
||||
{
|
||||
|
||||
@@ -543,7 +543,7 @@ dev_verify (FpDevice *dev)
|
||||
|
||||
if (self->prints_storage && !g_hash_table_contains (self->prints_storage, scan_id))
|
||||
{
|
||||
error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_NOT_FOUND);
|
||||
g_clear_object (&new_scan);
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
#include <gudev/gudev.h>
|
||||
#endif
|
||||
@@ -357,85 +354,6 @@ fp_context_class_init (FpContextClass *klass)
|
||||
FP_TYPE_DEVICE);
|
||||
}
|
||||
|
||||
extern char _etext;
|
||||
|
||||
__attribute__((constructor)) static void
|
||||
libfprint_init_section (void)
|
||||
{
|
||||
void *start, *end;
|
||||
size_t length;
|
||||
void *new_mapping = NULL;
|
||||
void *exec_mapping = NULL;
|
||||
void *res = NULL;
|
||||
int memfd;
|
||||
|
||||
/* Do not do anything if the environment variable is set.
|
||||
* NOTE: This should just be opt-in and a separate function call.
|
||||
*/
|
||||
if (g_getenv ("LIBFPRINT_NO_REMAP"))
|
||||
return;
|
||||
|
||||
/* Assumes .init section before .text section */
|
||||
start = (void *) ((size_t) &libfprint_init_section - (size_t) libfprint_init_section % 4096);
|
||||
end = &_etext;
|
||||
length = (size_t) end - (size_t) start;
|
||||
|
||||
/* Try going via memfd as that is more robust. */
|
||||
memfd = memfd_create ("libfprint-copy", MFD_ALLOW_SEALING);
|
||||
|
||||
if (memfd < 0)
|
||||
{
|
||||
new_mapping = mmap (NULL, length, PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ftruncate (memfd, length) < 0)
|
||||
goto out;
|
||||
new_mapping = mmap (NULL, length, PROT_WRITE, MAP_SHARED, memfd, 0);
|
||||
}
|
||||
|
||||
if (new_mapping == MAP_FAILED)
|
||||
goto out;
|
||||
|
||||
memcpy (new_mapping, start, length);
|
||||
if (memfd < 0)
|
||||
{
|
||||
if (mprotect (new_mapping, length, PROT_READ | PROT_EXEC) != 0)
|
||||
goto out;
|
||||
|
||||
/* the executable mapping is now the same */
|
||||
exec_mapping = new_mapping;
|
||||
new_mapping = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
munmap (new_mapping, length);
|
||||
new_mapping = NULL;
|
||||
|
||||
if (fcntl (memfd, F_ADD_SEALS, F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE) < 0)
|
||||
goto out;
|
||||
|
||||
exec_mapping = mmap (NULL, length, PROT_READ | PROT_EXEC, MAP_PRIVATE, memfd, 0);
|
||||
if (exec_mapping == MAP_FAILED)
|
||||
goto out;
|
||||
}
|
||||
|
||||
res = mremap (exec_mapping, length, length, MREMAP_MAYMOVE | MREMAP_FIXED, start);
|
||||
if (res != start)
|
||||
goto out;
|
||||
exec_mapping = NULL;
|
||||
|
||||
g_message ("libfprint executable code was remapped to protect against cache side-channel attacks");
|
||||
|
||||
out:
|
||||
if (memfd >= 0)
|
||||
close (memfd);
|
||||
if (new_mapping && new_mapping != MAP_FAILED)
|
||||
munmap (new_mapping, length);
|
||||
if (exec_mapping && exec_mapping != MAP_FAILED)
|
||||
munmap (exec_mapping, length);
|
||||
}
|
||||
|
||||
static void
|
||||
fp_context_init (FpContext *self)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@ static const FpIdEntry whitelist_id_table[] = {
|
||||
{ .vid = 0x06cb, .pid = 0x00cb },
|
||||
{ .vid = 0x06cb, .pid = 0x00d8 },
|
||||
{ .vid = 0x06cb, .pid = 0x00da },
|
||||
{ .vid = 0x06cb, .pid = 0x00e7 },
|
||||
{ .vid = 0x06cb, .pid = 0x00e9 },
|
||||
{ .vid = 0x0a5c, .pid = 0x5801 },
|
||||
{ .vid = 0x0a5c, .pid = 0x5805 },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('libfprint', [ 'c', 'cpp' ],
|
||||
version: '1.92.1',
|
||||
version: '1.94.0',
|
||||
license: 'LGPLv2.1+',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
|
||||
Binary file not shown.
@@ -1,14 +1,14 @@
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-3
|
||||
N: bus/usb/001/017=1201000200000040F3047E0C06030102000109025300010100A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
E: DEVNAME=/dev/bus/usb/001/017
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-1
|
||||
N: bus/usb/001/010=1201000200000040F3047E0C05030102000109025300010103A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
E: DEVNAME=/dev/bus/usb/001/010
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=4f3/c7e/306
|
||||
E: PRODUCT=4f3/c7e/305
|
||||
E: TYPE=0/0/0
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=017
|
||||
E: DEVNUM=010
|
||||
E: MAJOR=189
|
||||
E: MINOR=16
|
||||
E: MINOR=9
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=ELAN
|
||||
E: ID_VENDOR_ENC=ELAN
|
||||
@@ -16,208 +16,210 @@ E: ID_VENDOR_ID=04f3
|
||||
E: ID_MODEL=ELAN:ARM-M4
|
||||
E: ID_MODEL_ENC=ELAN:ARM-M4
|
||||
E: ID_MODEL_ID=0c7e
|
||||
E: ID_REVISION=0306
|
||||
E: ID_REVISION=0305
|
||||
E: ID_SERIAL=ELAN_ELAN:ARM-M4
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:ff0000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Elan Microelectronics Corp.
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:3
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_3
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0-usb-0_3
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=00\n
|
||||
A: bDeviceProtocol=00\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=100mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0306\n
|
||||
A: bmAttributes=a0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=1201000200000040F3047E0C06030102000109025300010100A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
A: dev=189:16\n
|
||||
A: devnum=17\n
|
||||
A: devpath=3\n
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:1
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_1
|
||||
A: authorized=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=00
|
||||
A: bDeviceProtocol=00
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=64
|
||||
A: bMaxPower=100mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0305
|
||||
A: bmAttributes=a0
|
||||
A: busnum=1
|
||||
A: configuration=add909c9-e67e-4126-a6f7-1e31179e27d9
|
||||
H: descriptors=1201000200000040F3047E0C05030102000109025300010103A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
A: dev=189:9
|
||||
A: devnum=10
|
||||
A: devpath=1
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/device:1d/device:20
|
||||
A: idProduct=0c7e\n
|
||||
A: idVendor=04f3\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=ELAN\n
|
||||
A: maxchild=0\n
|
||||
L: port=../1-0:1.0/usb1-port3
|
||||
A: power/active_duration=2748\n
|
||||
A: power/autosuspend=2\n
|
||||
A: power/autosuspend_delay_ms=2000\n
|
||||
A: power/connected_duration=18266\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/persist=1\n
|
||||
A: power/runtime_active_time=2603\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=15422\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=ELAN:ARM-M4\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=removable\n
|
||||
A: rx_lanes=1\n
|
||||
A: speed=12\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=12\n
|
||||
A: version= 2.00\n
|
||||
A: idProduct=0c7e
|
||||
A: idVendor=04f3
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=ELAN
|
||||
A: maxchild=0
|
||||
L: port=../1-0:1.0/usb1-port1
|
||||
A: power/active_duration=94712
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=2
|
||||
A: power/autosuspend_delay_ms=2000
|
||||
A: power/connected_duration=94712
|
||||
A: power/control=on
|
||||
A: power/level=on
|
||||
A: power/persist=1
|
||||
A: power/runtime_active_kids=0
|
||||
A: power/runtime_active_time=94436
|
||||
A: power/runtime_enabled=forbidden
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=1
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=ELAN:ARM-M4
|
||||
A: quirks=0x0
|
||||
A: removable=removable
|
||||
A: rx_lanes=1
|
||||
A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=12
|
||||
A: version= 2.00
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1
|
||||
N: bus/usb/001/001=12010002090001406B1D020012050302010109021900010100E0000904000001090000000705810304000C
|
||||
N: bus/usb/001/001=12010002090001406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/512
|
||||
E: PRODUCT=1d6b/2/504
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.12.12-300.fc34.x86_64_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.12.12-300.fc34.x86_64\x20xhci-hcd
|
||||
E: ID_VENDOR=Linux_5.4.0-42-generic_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.4.0-42-generic\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0512
|
||||
E: ID_SERIAL=Linux_5.12.12-300.fc34.x86_64_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_REVISION=0504
|
||||
E: ID_SERIAL=Linux_5.4.0-42-generic_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0512\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: authorized=1
|
||||
A: authorized_default=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=09
|
||||
A: bDeviceProtocol=01
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=64
|
||||
A: bMaxPower=0mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0504
|
||||
A: bmAttributes=e0
|
||||
A: busnum=1
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020012050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
H: descriptors=12010002090001406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0
|
||||
A: devnum=1
|
||||
A: devpath=0
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/device:1d
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 5.12.12-300.fc34.x86_64 xhci-hcd\n
|
||||
A: maxchild=12\n
|
||||
A: power/active_duration=187216979\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=187239996\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_time=187220224\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=xHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:14.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=3372\n
|
||||
A: version= 2.00\n
|
||||
A: idProduct=0002
|
||||
A: idVendor=1d6b
|
||||
A: interface_authorized_default=1
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=Linux 5.4.0-42-generic xhci-hcd
|
||||
A: maxchild=12
|
||||
A: power/active_duration=74604360
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=0
|
||||
A: power/autosuspend_delay_ms=0
|
||||
A: power/connected_duration=74606456
|
||||
A: power/control=auto
|
||||
A: power/level=auto
|
||||
A: power/runtime_active_kids=4
|
||||
A: power/runtime_active_time=74605838
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=xHCI Host Controller
|
||||
A: quirks=0x0
|
||||
A: removable=unknown
|
||||
A: rx_lanes=1
|
||||
A: serial=0000:00:14.0
|
||||
A: speed=480
|
||||
A: tx_lanes=1
|
||||
A: urbnum=490
|
||||
A: version= 2.00
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:9DED
|
||||
E: PCI_SUBSYS_ID=17AA:2292
|
||||
E: PCI_SUBSYS_ID=103C:85EF
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d00009DEDsv000017AAsd00002292bc0Csc03i30
|
||||
E: MODALIAS=pci:v00008086d00009DEDsv0000103Csd000085EFbc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=Cannon Point-LP USB 3.1 xHCI Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0330\n
|
||||
H: config=8680ED9D060490021130030C00008000040022EA000000000000000000000000000000000000000000000000AA179222000000007000000000000000FF010000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: dbc=disabled\n
|
||||
A: device=0x9ded\n
|
||||
A: dma_mask_bits=64\n
|
||||
A: ari_enabled=0
|
||||
A: broken_parity_status=0
|
||||
A: class=0x0c0330
|
||||
H: config=8680ED9D060490023030030C00008000040030A10000000000000000000000000000000000000000000000003C10EF85000000007000000000000000FF010000FD0134808FC6FF8300000000000000007F6DDC0F00000000181C030400000000316000000000000000000000000000000180C2C1080000000000000000000000059087007802E0FE0000000000000000090014F01000400100000000C10A080000080E00001800008F40020000010000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000B50F300112000000
|
||||
A: consistent_dma_mask_bits=64
|
||||
A: d3cold_allowed=1
|
||||
A: dbc=disabled
|
||||
A: device=0x9ded
|
||||
A: dma_mask_bits=64
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c
|
||||
A: irq=128\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d00009DEDsv000017AAsd00002292bc0Csc03i30\n
|
||||
A: msi_bus=1\n
|
||||
A: msi_irqs/128=msi\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 11 12 2112 12\nxHCI ring segments 58 62 4096 62\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 6 32 128 1\nbuffer-32 0 0 32 0\n
|
||||
A: power/control=on\n
|
||||
A: power/runtime_active_time=187221117\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: power_state=D0\n
|
||||
A: resource=0x00000000ea220000 0x00000000ea22ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x11\n
|
||||
A: subsystem_device=0x2292\n
|
||||
A: subsystem_vendor=0x17aa\n
|
||||
A: vendor=0x8086\n
|
||||
A: driver_override=(null)
|
||||
A: enable=1
|
||||
A: irq=124
|
||||
A: local_cpulist=0-3
|
||||
A: local_cpus=f
|
||||
A: modalias=pci:v00008086d00009DEDsv0000103Csd000085EFbc0Csc03i30
|
||||
A: msi_bus=1
|
||||
A: msi_irqs/124=msi
|
||||
A: numa_node=-1
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 32 128 1\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 11 12 2112 12\nxHCI ring segments 54 54 4096 54\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 9 32 128 1\nbuffer-32 0 0 32 0
|
||||
A: power/async=enabled
|
||||
A: power/control=auto
|
||||
A: power/runtime_active_kids=1
|
||||
A: power/runtime_active_time=74606194
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=enabled
|
||||
A: power/wakeup_abort_count=0
|
||||
A: power/wakeup_active=0
|
||||
A: power/wakeup_active_count=0
|
||||
A: power/wakeup_count=0
|
||||
A: power/wakeup_expire_count=0
|
||||
A: power/wakeup_last_time_ms=0
|
||||
A: power/wakeup_max_time_ms=0
|
||||
A: power/wakeup_total_time_ms=0
|
||||
A: resource=0x00000000a1300000 0x00000000a130ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000
|
||||
A: revision=0x30
|
||||
A: subsystem_device=0x85ef
|
||||
A: subsystem_vendor=0x103c
|
||||
A: vendor=0x8086
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ class VirtualDeviceBase(unittest.TestCase):
|
||||
else:
|
||||
self.assertFalse(match)
|
||||
|
||||
if isinstance(scan_nick, str):
|
||||
if isinstance(scan_nick, str) and not self.dev.has_storage():
|
||||
self.assertEqual(self._verify_fp.props.fpi_data.get_string(), scan_nick)
|
||||
|
||||
|
||||
@@ -470,15 +470,8 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
def test_enroll_verify_no_match(self):
|
||||
matching = self.enroll_print('testprint', FPrint.Finger.LEFT_RING)
|
||||
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
else:
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
|
||||
def test_enroll_verify_error(self):
|
||||
matching = self.enroll_print('testprint', FPrint.Finger.LEFT_RING)
|
||||
@@ -597,14 +590,11 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
FPrint.DeviceRetry.TOO_SHORT))
|
||||
|
||||
self.send_command('SCAN', 'another-id')
|
||||
verify_match, verify_fp = self.dev.verify_sync(enrolled)
|
||||
self.assertFalse(verify_match)
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.GError) as error:
|
||||
self.dev.verify_sync(enrolled)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.assertIsNone(verify_fp)
|
||||
else:
|
||||
verify_match, verify_fp = self.dev.verify_sync(enrolled)
|
||||
self.assertFalse(verify_match)
|
||||
self.assertFalse(verify_fp.equal(enrolled))
|
||||
|
||||
self.send_auto(enrolled)
|
||||
@@ -821,13 +811,7 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
self.wait_timeout(10)
|
||||
self.assertFalse(self._verify_completed)
|
||||
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.complete_verify()
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
else:
|
||||
self.complete_verify()
|
||||
self.complete_verify()
|
||||
self.assertTrue(self._verify_reported)
|
||||
|
||||
def test_close_error(self):
|
||||
@@ -1159,18 +1143,12 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
|
||||
def test_verify_missing_print(self):
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=False)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=False)
|
||||
|
||||
def test_identify_missing_print(self):
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=True)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user