Compare commits

..

6 Commits

Author SHA1 Message Date
Benjamin Berg
c7cab77fc1 usb-transfer: Work around libgusb cancellation issue
We have plenty of code paths where a transfer may be cancelled before it
is submitted. Unfortunately, libgusb up to and including version 0.3.6
are not handling that case correctly (due to libusb ignoring
cancellation on transfers that are not yet submitted).

Work around this, but do so in a somewhat lazy fashion that is not
entirely race free.

Closes: #306
2020-10-01 00:19:35 +02:00
Benjamin Berg
a63dcc96d5 virtual_image: Open a window for race conditions during open/close
Delay the open/close callbacks by 100ms so that we have a window of
opportunity for race conditions. This is needed to test certain
conditiosn in fprintd.
2020-09-29 12:02:19 +00:00
Benjamin Berg
fab349f356 Remove trailing \n where they are not necessary
Adding a trailing \n to g_message, g_debug, g_warning and g_error is not
neccessary, as a newline will be added automatically by the logging
infrastructure.
2020-09-29 10:42:03 +02:00
Benjamin Berg
62edf93958 tests: Add AES3500 test case
Thanks for Federico Cupellini for providing test samples.
2020-09-29 10:35:48 +02:00
Benjamin Berg
8c4ff253cb aes3k: Fix transfer error path and cancellable lifetime
The cancellable needs to be free'ed at deactivation. Also free it if we
run into a fatal error, which then in turn indicates that the device is
deactivated already.
2020-09-29 10:35:25 +02:00
Benjamin Berg
3ce6a15547 image-device: Don't deactivate if deactivation was already started
The test only prevent deactivation after it completed. Also guard
against trying to deactivate a second time.
2020-09-28 19:12:28 +02:00
17 changed files with 668 additions and 50 deletions

View File

@@ -57,7 +57,7 @@ on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
fp_device_close_finish (dev, res, &error); fp_device_close_finish (dev, res, &error);
if (error) if (error)
g_warning ("Failed closing device %s\n", error->message); g_warning ("Failed closing device %s", error->message);
g_main_loop_quit (enroll_data->loop); g_main_loop_quit (enroll_data->loop);
} }
@@ -89,7 +89,7 @@ on_enroll_completed (FpDevice *dev, GAsyncResult *res, void *user_data)
} }
else else
{ {
g_warning ("Enroll failed with error %s\n", error->message); g_warning ("Enroll failed with error %s", error->message);
} }
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed, fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed,

View File

@@ -58,7 +58,7 @@ on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
fp_device_close_finish (dev, res, &error); fp_device_close_finish (dev, res, &error);
if (error) if (error)
g_warning ("Failed closing device %s\n", error->message); g_warning ("Failed closing device %s", error->message);
g_main_loop_quit (capture_data->loop); g_main_loop_quit (capture_data->loop);
} }

View File

@@ -54,7 +54,7 @@ on_device_closed (FpDevice *dev,
fp_device_close_finish (dev, res, &error); fp_device_close_finish (dev, res, &error);
if (error) if (error)
g_warning ("Failed closing device %s\n", error->message); g_warning ("Failed closing device %s", error->message);
g_main_loop_quit (list_data->loop); g_main_loop_quit (list_data->loop);
} }
@@ -86,7 +86,7 @@ delete_next_print (FpDevice *dev,
g_assert_nonnull (list_data->to_delete); g_assert_nonnull (list_data->to_delete);
print = list_data->to_delete->data; print = list_data->to_delete->data;
g_debug ("Deleting print %s\n", fp_print_get_description (print)); g_debug ("Deleting print %s", fp_print_get_description (print));
fp_device_delete_print (dev, print, NULL, fp_device_delete_print (dev, print, NULL,
(GAsyncReadyCallback) on_print_deleted, list_data); (GAsyncReadyCallback) on_print_deleted, list_data);
} }

View File

@@ -57,7 +57,7 @@ on_device_closed (FpDevice *dev, GAsyncResult *res, void *user_data)
fp_device_close_finish (dev, res, &error); fp_device_close_finish (dev, res, &error);
if (error) if (error)
g_warning ("Failed closing device %s\n", error->message); g_warning ("Failed closing device %s", error->message);
g_main_loop_quit (verify_data->loop); g_main_loop_quit (verify_data->loop);
} }

View File

@@ -197,12 +197,12 @@ process_strip_data (FpiSsm *ssm, FpImageDevice *dev,
if (data[0] != AES2550_EDATA_MAGIC) if (data[0] != AES2550_EDATA_MAGIC)
{ {
fp_dbg ("Bogus magic: %.2x\n", (int) (data[0])); fp_dbg ("Bogus magic: %.2x", (int) (data[0]));
return FALSE; return FALSE;
} }
len = data[1] * 256 + data[2]; len = data[1] * 256 + data[2];
if (len != (AES2550_STRIP_SIZE - 3)) if (len != (AES2550_STRIP_SIZE - 3))
fp_dbg ("Bogus frame len: %.4x\n", len); fp_dbg ("Bogus frame len: %.4x", len);
stripe = g_malloc0 (FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof (struct fpi_frame)); /* 4 bits per pixel */ stripe = g_malloc0 (FRAME_WIDTH * FRAME_HEIGHT / 2 + sizeof (struct fpi_frame)); /* 4 bits per pixel */
stripe->delta_x = (int8_t) data[6]; stripe->delta_x = (int8_t) data[6];
stripe->delta_y = -(int8_t) data[7]; stripe->delta_y = -(int8_t) data[7];

View File

@@ -76,6 +76,7 @@ img_cb (FpiUsbTransfer *transfer, FpDevice *device,
{ {
FpImageDevice *dev = FP_IMAGE_DEVICE (device); FpImageDevice *dev = FP_IMAGE_DEVICE (device);
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (device); FpiDeviceAes3k *self = FPI_DEVICE_AES3K (device);
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self); FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
unsigned char *ptr = transfer->buffer; unsigned char *ptr = transfer->buffer;
FpImage *tmp; FpImage *tmp;
@@ -90,11 +91,14 @@ img_cb (FpiUsbTransfer *transfer, FpDevice *device,
{ {
/* Cancellation implies we are deactivating. */ /* Cancellation implies we are deactivating. */
g_error_free (error); g_error_free (error);
g_clear_object (&priv->img_trf_cancel);
fpi_image_device_deactivate_complete (dev, NULL); fpi_image_device_deactivate_complete (dev, NULL);
return; return;
} }
fpi_image_device_session_error (dev, error); fpi_image_device_session_error (dev, error);
g_clear_object (&priv->img_trf_cancel);
return;
} }
fpi_image_device_report_finger_status (dev, TRUE); fpi_image_device_report_finger_status (dev, TRUE);
@@ -144,10 +148,15 @@ do_capture (FpImageDevice *dev)
static void static void
init_reqs_cb (FpImageDevice *dev, GError *result, void *user_data) init_reqs_cb (FpImageDevice *dev, GError *result, void *user_data)
{ {
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (FPI_DEVICE_AES3K (dev));
fpi_image_device_activate_complete (dev, result); fpi_image_device_activate_complete (dev, result);
if (!result) if (!result)
{
priv->img_trf_cancel = g_cancellable_new ();
do_capture (dev); do_capture (dev);
} }
}
static void static void
aes3k_dev_activate (FpImageDevice *dev) aes3k_dev_activate (FpImageDevice *dev)
@@ -157,7 +166,6 @@ aes3k_dev_activate (FpImageDevice *dev)
FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self); FpiDeviceAes3kClass *cls = FPI_DEVICE_AES3K_GET_CLASS (self);
g_assert (!priv->img_trf_cancel); g_assert (!priv->img_trf_cancel);
priv->img_trf_cancel = g_cancellable_new ();
aes_write_regv (dev, cls->init_reqs, cls->init_reqs_len, init_reqs_cb, NULL); aes_write_regv (dev, cls->init_reqs, cls->init_reqs_len, init_reqs_cb, NULL);
} }
@@ -167,8 +175,11 @@ aes3k_dev_deactivate (FpImageDevice *dev)
FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev); FpiDeviceAes3k *self = FPI_DEVICE_AES3K (dev);
FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self); FpiDeviceAes3kPrivate *priv = fpi_device_aes3k_get_instance_private (self);
/* Deactivation always finishes from the cancellation handler */ /* Deactivation finishes from the cancellation handler */
if (priv->img_trf_cancel)
g_cancellable_cancel (priv->img_trf_cancel); g_cancellable_cancel (priv->img_trf_cancel);
else
fpi_image_device_deactivate_complete (dev, NULL);
} }
static void static void

View File

@@ -116,7 +116,7 @@ aesX660_read_calibrate_data_cb (FpiUsbTransfer *transfer,
/* Calibrate response was read correctly? */ /* Calibrate response was read correctly? */
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_CALIBRATE_RESPONSE) if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_CALIBRATE_RESPONSE)
{ {
fp_dbg ("Bogus calibrate response: %.2x\n", data[0]); fp_dbg ("Bogus calibrate response: %.2x", data[0]);
fpi_ssm_mark_failed (transfer->ssm, fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
"Bogus calibrate " "Bogus calibrate "
@@ -155,14 +155,14 @@ finger_det_read_fd_data_cb (FpiUsbTransfer *transfer,
if (error) if (error)
{ {
fp_dbg ("Failed to read FD data\n"); fp_dbg ("Failed to read FD data");
fpi_ssm_mark_failed (transfer->ssm, error); fpi_ssm_mark_failed (transfer->ssm, error);
return; return;
} }
if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_FINGER_DET_RESPONSE) if (data[AESX660_RESPONSE_TYPE_OFFSET] != AESX660_FINGER_DET_RESPONSE)
{ {
fp_dbg ("Bogus FD response: %.2x\n", data[0]); fp_dbg ("Bogus FD response: %.2x", data[0]);
fpi_ssm_mark_failed (transfer->ssm, fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
"Bogus FD response %.2x", "Bogus FD response %.2x",
@@ -177,7 +177,7 @@ finger_det_read_fd_data_cb (FpiUsbTransfer *transfer,
} }
else else
{ {
fp_dbg ("Wait for finger returned %.2x as result\n", fp_dbg ("Wait for finger returned %.2x as result",
data[AESX660_FINGER_PRESENT_OFFSET]); data[AESX660_FINGER_PRESENT_OFFSET]);
fpi_ssm_jump_to_state (transfer->ssm, FINGER_DET_SEND_FD_CMD); fpi_ssm_jump_to_state (transfer->ssm, FINGER_DET_SEND_FD_CMD);
} }
@@ -405,7 +405,7 @@ capture_read_stripe_data_cb (FpiUsbTransfer *transfer,
g_byte_array_set_size (priv->stripe_packet, 0); g_byte_array_set_size (priv->stripe_packet, 0);
} }
fp_dbg ("finger %s\n", finger_missing ? "missing" : "present"); fp_dbg ("finger %s", finger_missing ? "missing" : "present");
if (finger_missing) if (finger_missing)
fpi_ssm_next_state (transfer->ssm); fpi_ssm_next_state (transfer->ssm);
@@ -440,7 +440,7 @@ capture_run_state (FpiSsm *ssm, FpDevice *_dev)
break; break;
case CAPTURE_SET_IDLE: case CAPTURE_SET_IDLE:
fp_dbg ("Got %lu frames\n", priv->strips_len); fp_dbg ("Got %lu frames", priv->strips_len);
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd), aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
capture_set_idle_cmd_cb); capture_set_idle_cmd_cb);
break; break;
@@ -513,19 +513,19 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
if (error) if (error)
{ {
fp_dbg ("read_id cmd failed\n"); fp_dbg ("read_id cmd failed");
fpi_ssm_mark_failed (transfer->ssm, error); fpi_ssm_mark_failed (transfer->ssm, error);
return; return;
} }
/* ID was read correctly */ /* ID was read correctly */
if (data[0] == 0x07) if (data[0] == 0x07)
{ {
fp_dbg ("Sensor device id: %.2x%2x, bcdDevice: %.2x.%.2x, init status: %.2x\n", fp_dbg ("Sensor device id: %.2x%2x, bcdDevice: %.2x.%.2x, init status: %.2x",
data[4], data[3], data[5], data[6], data[7]); data[4], data[3], data[5], data[6], data[7]);
} }
else else
{ {
fp_dbg ("Bogus read ID response: %.2x\n", data[AESX660_RESPONSE_TYPE_OFFSET]); fp_dbg ("Bogus read ID response: %.2x", data[AESX660_RESPONSE_TYPE_OFFSET]);
fpi_ssm_mark_failed (transfer->ssm, fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
"Bogus read ID response %.2x", "Bogus read ID response %.2x",
@@ -553,7 +553,7 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
break; break;
default: default:
fp_dbg ("Failed to init device! init status: %.2x\n", data[7]); fp_dbg ("Failed to init device! init status: %.2x", data[7]);
fpi_ssm_mark_failed (transfer->ssm, fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
"Failed to init device %.2x", "Failed to init device %.2x",
@@ -570,11 +570,11 @@ activate_read_init_cb (FpiUsbTransfer *transfer, FpDevice *device,
FpiDeviceAesX660Private *priv = fpi_device_aes_x660_get_instance_private (self); FpiDeviceAesX660Private *priv = fpi_device_aes_x660_get_instance_private (self);
unsigned char *data = transfer->buffer; unsigned char *data = transfer->buffer;
fp_dbg ("read_init_cb\n"); fp_dbg ("read_init_cb");
if (error) if (error)
{ {
fp_dbg ("read_init transfer status: %s, actual_len: %d\n", error->message, fp_dbg ("read_init transfer status: %s, actual_len: %d", error->message,
(gint) transfer->actual_length); (gint) transfer->actual_length);
fpi_ssm_mark_failed (transfer->ssm, error); fpi_ssm_mark_failed (transfer->ssm, error);
return; return;
@@ -582,7 +582,7 @@ activate_read_init_cb (FpiUsbTransfer *transfer, FpDevice *device,
/* ID was read correctly */ /* ID was read correctly */
if (data[0] != 0x42 || data[3] != 0x01) if (data[0] != 0x42 || data[3] != 0x01)
{ {
fp_dbg ("Bogus read init response: %.2x %.2x\n", data[0], fp_dbg ("Bogus read init response: %.2x %.2x", data[0],
data[3]); data[3]);
fpi_ssm_mark_failed (transfer->ssm, fpi_ssm_mark_failed (transfer->ssm,
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
@@ -614,13 +614,13 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
{ {
case ACTIVATE_SET_IDLE: case ACTIVATE_SET_IDLE:
priv->init_seq_idx = 0; priv->init_seq_idx = 0;
fp_dbg ("Activate: set idle\n"); fp_dbg ("Activate: set idle");
aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd), aesX660_send_cmd (ssm, _dev, set_idle_cmd, sizeof (set_idle_cmd),
fpi_ssm_usb_transfer_cb); fpi_ssm_usb_transfer_cb);
break; break;
case ACTIVATE_SEND_READ_ID_CMD: case ACTIVATE_SEND_READ_ID_CMD:
fp_dbg ("Activate: read ID\n"); fp_dbg ("Activate: read ID");
aesX660_send_cmd (ssm, _dev, read_id_cmd, sizeof (read_id_cmd), aesX660_send_cmd (ssm, _dev, read_id_cmd, sizeof (read_id_cmd),
fpi_ssm_usb_transfer_cb); fpi_ssm_usb_transfer_cb);
break; break;
@@ -630,7 +630,7 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
break; break;
case ACTIVATE_SEND_INIT_CMD: case ACTIVATE_SEND_INIT_CMD:
fp_dbg ("Activate: send init seq #%d cmd #%d\n", fp_dbg ("Activate: send init seq #%d cmd #%d",
priv->init_seq_idx, priv->init_seq_idx,
priv->init_cmd_idx); priv->init_cmd_idx);
aesX660_send_cmd (ssm, _dev, aesX660_send_cmd (ssm, _dev,
@@ -640,7 +640,7 @@ activate_run_state (FpiSsm *ssm, FpDevice *_dev)
break; break;
case ACTIVATE_READ_INIT_RESPONSE: case ACTIVATE_READ_INIT_RESPONSE:
fp_dbg ("Activate: read init response\n"); fp_dbg ("Activate: read init response");
aesX660_read_response (ssm, _dev, TRUE, FALSE, INIT_LEN, activate_read_init_cb); aesX660_read_response (ssm, _dev, TRUE, FALSE, INIT_LEN, activate_read_init_cb);
break; break;

View File

@@ -171,7 +171,7 @@ finger_present (unsigned char *img, size_t len, int sum_threshold)
if (img[i] < 160) if (img[i] < 160)
sum++; sum++;
fp_dbg ("finger_present: sum is %d\n", sum); fp_dbg ("finger_present: sum is %d", sum);
return sum < sum_threshold ? 0 : 1; return sum < sum_threshold ? 0 : 1;
} }
@@ -184,7 +184,7 @@ finger_det_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
if (error) if (error)
{ {
fp_dbg ("data transfer status %s\n", error->message); fp_dbg ("data transfer status %s", error->message);
fpi_image_device_session_error (dev, error); fpi_image_device_session_error (dev, error);
return; return;
} }
@@ -212,7 +212,7 @@ finger_det_cmd_cb (FpiUsbTransfer *t, FpDevice *device,
if (error) if (error)
{ {
fp_dbg ("req transfer status %s\n", error->message); fp_dbg ("req transfer status %s", error->message);
fpi_image_device_session_error (dev, error); fpi_image_device_session_error (dev, error);
return; return;
} }
@@ -411,7 +411,7 @@ dev_init (FpImageDevice *dev)
break; break;
default: default:
fp_err ("Device variant %lu is not known\n", driver_data); fp_err ("Device variant %lu is not known", driver_data);
g_assert_not_reached (); g_assert_not_reached ();
fpi_image_device_open_complete (dev, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL)); fpi_image_device_open_complete (dev, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL));
return; return;

View File

@@ -193,7 +193,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
if (self->deactivating) if (self->deactivating)
{ {
fp_dbg ("Deactivate requested\n"); fp_dbg ("Deactivate requested");
fpi_ssm_mark_completed (transfer->ssm); fpi_ssm_mark_completed (transfer->ssm);
return; return;
} }
@@ -208,7 +208,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
if (fpi_ssm_get_cur_state (transfer->ssm) == CAPTURE_READ_DATA_TERM) if (fpi_ssm_get_cur_state (transfer->ssm) == CAPTURE_READ_DATA_TERM)
{ {
fp_dbg ("Terminating SSM\n"); fp_dbg ("Terminating SSM");
fpi_ssm_mark_completed (transfer->ssm); fpi_ssm_mark_completed (transfer->ssm);
return; return;
} }
@@ -219,7 +219,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
response_size += 9; /* 7 bytes for header, 2 for CRC */ response_size += 9; /* 7 bytes for header, 2 for CRC */
if (response_size > transfer->actual_length) if (response_size > transfer->actual_length)
{ {
fp_dbg ("response_size is %lu, actual_length is %d\n", fp_dbg ("response_size is %lu, actual_length is %d",
response_size, (gint) transfer->actual_length); response_size, (gint) transfer->actual_length);
fp_dbg ("Waiting for rest of transfer"); fp_dbg ("Waiting for rest of transfer");
BUG_ON (self->response_rest); BUG_ON (self->response_rest);
@@ -237,7 +237,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
{ {
/* No finger */ /* No finger */
case 0x28: case 0x28:
fp_dbg ("18th byte is %.2x\n", data[18]); fp_dbg ("18th byte is %.2x", data[18]);
switch (data[18]) switch (data[18])
{ {
case 0x0c: case 0x0c:
@@ -254,7 +254,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
case 0x1e: case 0x1e:
/* short scan */ /* short scan */
fp_err ("short scan, aborting\n"); fp_err ("short scan, aborting");
fpi_image_device_retry_scan (dev, fpi_image_device_retry_scan (dev,
FP_DEVICE_RETRY_TOO_SHORT); FP_DEVICE_RETRY_TOO_SHORT);
fpi_image_device_report_finger_status (dev, fpi_image_device_report_finger_status (dev,
@@ -265,7 +265,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
case 0x1d: case 0x1d:
/* too much horisontal movement */ /* too much horisontal movement */
fp_err ("too much horisontal movement, aborting\n"); fp_err ("too much horisontal movement, aborting");
fpi_image_device_retry_scan (dev, fpi_image_device_retry_scan (dev,
FP_DEVICE_RETRY_CENTER_FINGER); FP_DEVICE_RETRY_CENTER_FINGER);
fpi_image_device_report_finger_status (dev, fpi_image_device_report_finger_status (dev,
@@ -276,7 +276,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
default: default:
/* some error happened, cancel scan */ /* some error happened, cancel scan */
fp_err ("something bad happened, stop scan\n"); fp_err ("something bad happened, stop scan");
fpi_image_device_retry_scan (dev, fpi_image_device_retry_scan (dev,
FP_DEVICE_RETRY); FP_DEVICE_RETRY);
fpi_image_device_report_finger_status (dev, fpi_image_device_report_finger_status (dev,
@@ -307,7 +307,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
upektc_img_process_image_frame (self->image_bits + self->image_size, upektc_img_process_image_frame (self->image_bits + self->image_size,
data); data);
BUG_ON (self->image_size != IMAGE_SIZE); BUG_ON (self->image_size != IMAGE_SIZE);
fp_dbg ("Image size is %lu\n", fp_dbg ("Image size is %lu",
self->image_size); self->image_size);
img = fp_image_new (IMAGE_WIDTH, IMAGE_HEIGHT); img = fp_image_new (IMAGE_WIDTH, IMAGE_HEIGHT);
img->flags |= FPI_IMAGE_PARTIAL; img->flags |= FPI_IMAGE_PARTIAL;
@@ -320,7 +320,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
break; break;
default: default:
fp_err ("Unknown response!\n"); fp_err ("Unknown response!");
fpi_ssm_mark_failed (transfer->ssm, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL)); fpi_ssm_mark_failed (transfer->ssm, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL));
break; break;
} }
@@ -331,7 +331,7 @@ capture_read_data_cb (FpiUsbTransfer *transfer, FpDevice *device,
break; break;
default: default:
fp_err ("Not handled response!\n"); fp_err ("Not handled response!");
fpi_ssm_mark_failed (transfer->ssm, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL)); fpi_ssm_mark_failed (transfer->ssm, fpi_device_error_new (FP_DEVICE_ERROR_GENERAL));
} }
} }

View File

@@ -723,7 +723,7 @@ imaging_run_state (FpiSsm *ssm, FpDevice *_dev)
num_lines); num_lines);
if (flags & BLOCKF_CHANGE_KEY) if (flags & BLOCKF_CHANGE_KEY)
{ {
fp_dbg ("changing encryption keys.\n"); fp_dbg ("changing encryption keys.");
img->block_info[self->img_block].flags &= ~BLOCKF_CHANGE_KEY; img->block_info[self->img_block].flags &= ~BLOCKF_CHANGE_KEY;
img->key_number++; img->key_number++;
self->img_enc_seed = rand (); self->img_enc_seed = rand ();

View File

@@ -288,7 +288,8 @@ dev_init (FpImageDevice *dev)
start_listen (self); start_listen (self);
fpi_image_device_open_complete (dev, NULL); /* Delay result to open up the possibility of testing race conditions. */
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_open_complete, NULL, NULL);
} }
static void static void
@@ -303,7 +304,8 @@ dev_deinit (FpImageDevice *dev)
g_clear_object (&self->listener); g_clear_object (&self->listener);
g_clear_object (&self->connection); g_clear_object (&self->connection);
fpi_image_device_close_complete (dev, NULL); /* Delay result to open up the possibility of testing race conditions. */
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_close_complete, NULL, NULL);
} }
static void static void

View File

@@ -60,7 +60,7 @@ fpi_image_device_activate (FpImageDevice *self)
* starting the next operation. */ * starting the next operation. */
g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove); g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove);
fp_dbg ("Activating image device\n"); fp_dbg ("Activating image device");
cls->activate (self); cls->activate (self);
} }
@@ -71,7 +71,7 @@ fpi_image_device_deactivate (FpImageDevice *self)
FpImageDevicePrivate *priv = fp_image_device_get_instance_private (self); FpImageDevicePrivate *priv = fp_image_device_get_instance_private (self);
FpImageDeviceClass *cls = FP_IMAGE_DEVICE_GET_CLASS (device); FpImageDeviceClass *cls = FP_IMAGE_DEVICE_GET_CLASS (device);
if (!priv->active) if (!priv->active || priv->state == FPI_IMAGE_DEVICE_STATE_INACTIVE)
{ {
/* XXX: We currently deactivate both from minutiae scan result /* XXX: We currently deactivate both from minutiae scan result
* and finger off report. */ * and finger off report. */
@@ -84,7 +84,7 @@ fpi_image_device_deactivate (FpImageDevice *self)
priv->state = FPI_IMAGE_DEVICE_STATE_INACTIVE; priv->state = FPI_IMAGE_DEVICE_STATE_INACTIVE;
g_object_notify (G_OBJECT (self), "fpi-image-device-state"); g_object_notify (G_OBJECT (self), "fpi-image-device-state");
fp_dbg ("Deactivating image device\n"); fp_dbg ("Deactivating image device");
cls->deactivate (self); cls->deactivate (self);
} }
@@ -106,7 +106,7 @@ fp_image_device_change_state (FpImageDevice *self, FpiImageDeviceState state)
prev_state_str = g_enum_to_string (FPI_TYPE_IMAGE_DEVICE_STATE, priv->state); prev_state_str = g_enum_to_string (FPI_TYPE_IMAGE_DEVICE_STATE, priv->state);
state_str = g_enum_to_string (FPI_TYPE_IMAGE_DEVICE_STATE, state); state_str = g_enum_to_string (FPI_TYPE_IMAGE_DEVICE_STATE, state);
fp_dbg ("Image device internal state change from %s to %s\n", fp_dbg ("Image device internal state change from %s to %s",
prev_state_str, state_str); prev_state_str, state_str);
priv->state = state; priv->state = state;

View File

@@ -354,6 +354,24 @@ transfer_finish_cb (GObject *source_object, GAsyncResult *res, gpointer user_dat
fpi_usb_transfer_unref (transfer); fpi_usb_transfer_unref (transfer);
} }
static gboolean
transfer_cancel_cb (FpiUsbTransfer *transfer)
{
GError *error;
FpiUsbTransferCallback callback;
error = g_error_new_literal (G_IO_ERROR,
G_IO_ERROR_CANCELLED,
"Transfer was cancelled before being started");
callback = transfer->callback;
transfer->callback = NULL;
transfer->actual_length = -1;
callback (transfer, transfer->device, transfer->user_data, error);
fpi_usb_transfer_unref (transfer);
return G_SOURCE_REMOVE;
}
/** /**
* fpi_usb_transfer_submit: * fpi_usb_transfer_submit:
@@ -387,6 +405,18 @@ fpi_usb_transfer_submit (FpiUsbTransfer *transfer,
log_transfer (transfer, TRUE, NULL); log_transfer (transfer, TRUE, NULL);
/* Work around libgusb cancellation issue, see
* https://github.com/hughsie/libgusb/pull/42
* should be fixed with libgusb 0.3.7.
* Note that this is not race free, we rely on libfprint and API users
* not cancelling from a different thread here.
*/
if (cancellable && g_cancellable_is_cancelled (cancellable))
{
g_idle_add ((GSourceFunc) transfer_cancel_cb, transfer);
return;
}
switch (transfer->type) switch (transfer->type)
{ {
case FP_TRANSFER_BULK: case FP_TRANSFER_BULK:

File diff suppressed because one or more lines are too long

BIN
tests/aes3500/capture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

561
tests/aes3500/device Normal file
View File

@@ -0,0 +1,561 @@
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0/usb3/3-1/3-1.1/3-1.1.3
N: bus/usb/003/004=12011001FFFFFF08FF0831570000000100010902200001010080320904000002FFFFFF000705810240000007050202080000
E: BUSNUM=003
E: DEVNAME=/dev/bus/usb/003/004
E: DEVNUM=004
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_MODEL=Fingerprint_Sensor
E: ID_MODEL_ENC=Fingerprint\x20Sensor
E: ID_MODEL_FROM_DATABASE=AES3500 TruePrint Sensor
E: ID_MODEL_ID=5731
E: ID_REVISION=0000
E: ID_SERIAL=08ff_Fingerprint_Sensor
E: ID_USB_INTERFACES=:ffffff:
E: ID_VENDOR=08ff
E: ID_VENDOR_ENC=08ff
E: ID_VENDOR_FROM_DATABASE=AuthenTec, Inc.
E: ID_VENDOR_ID=08ff
E: LIBFPRINT_DRIVER=AuthenTec AES3500
E: MAJOR=189
E: MINOR=259
E: PRODUCT=8ff/5731/0
E: SUBSYSTEM=usb
E: TYPE=255/255/255
A: authorized=1
A: avoid_reset_quirk=0
A: bConfigurationValue=1
A: bDeviceClass=ff
A: bDeviceProtocol=ff
A: bDeviceSubClass=ff
A: bMaxPacketSize0=8
A: bMaxPower=100mA
A: bNumConfigurations=1
A: bNumInterfaces= 1
A: bcdDevice=0000
A: bmAttributes=80
A: busnum=3
A: configuration=
H: descriptors=12011001FFFFFF08FF0831570000000100010902200001010080320904000002FFFFFF000705810240000007050202080000
A: dev=189:259
A: devnum=4
A: devpath=1.1.3
L: driver=../../../../../../../../../../bus/usb/drivers/usb
A: idProduct=5731
A: idVendor=08ff
A: ltm_capable=no
A: maxchild=0
L: port=../3-1.1:1.0/3-1.1-port3
A: power/active_duration=3601332
A: power/async=enabled
A: power/autosuspend=2
A: power/autosuspend_delay_ms=2000
A: power/connected_duration=3601332
A: power/control=auto
A: power/level=auto
A: power/persist=1
A: power/runtime_active_kids=0
A: power/runtime_active_time=3601128
A: power/runtime_enabled=enabled
A: power/runtime_status=active
A: power/runtime_suspended_time=0
A: power/runtime_usage=0
A: product=Fingerprint Sensor
A: quirks=0x0
A: removable=removable
A: speed=12
A: urbnum=82
A: version= 1.10
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0/usb3/3-1/3-1.1
N: bus/usb/003/003=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
E: BUSNUM=003
E: DEVNAME=/dev/bus/usb/003/003
E: DEVNUM=003
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_FOR_SEAT=usb-pci-0000_39_00_0-usb-0_1_1
E: ID_MODEL=USB2.0_Hub
E: ID_MODEL_ENC=USB2.0\x20Hub\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_MODEL_ID=0006
E: ID_PATH=pci-0000:39:00.0-usb-0:1.1
E: ID_PATH_TAG=pci-0000_39_00_0-usb-0_1_1
E: ID_REVISION=9100
E: ID_SERIAL=VIA_Labs__Inc._USB2.0_Hub
E: ID_USB_INTERFACES=:090000:
E: ID_VENDOR=VIA_Labs__Inc.
E: ID_VENDOR_ENC=VIA\x20Labs\x2c\x20Inc.\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_VENDOR_ID=2230
E: MAJOR=189
E: MINOR=258
E: PRODUCT=2230/6/9100
E: SUBSYSTEM=usb
E: TAGS=:seat:
E: TYPE=9/0/1
A: authorized=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=9100
A: bmAttributes=e0
A: busnum=3
A: configuration=
H: descriptors=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
A: dev=189:258
A: devnum=3
A: devpath=1.1
L: driver=../../../../../../../../../bus/usb/drivers/usb
A: idProduct=0006
A: idVendor=2230
A: ltm_capable=no
A: manufacturer=VIA Labs, Inc.
A: maxchild=4
L: port=../3-1:1.0/3-1-port1
A: power/active_duration=3601776
A: power/async=enabled
A: power/autosuspend=0
A: power/autosuspend_delay_ms=0
A: power/connected_duration=3601776
A: power/control=auto
A: power/level=auto
A: power/runtime_active_kids=2
A: power/runtime_active_time=3601572
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=USB2.0 Hub
A: quirks=0x0
A: removable=fixed
A: speed=480
A: urbnum=40
A: version= 2.10
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0/usb3/3-1
N: bus/usb/003/002=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
E: BUSNUM=003
E: DEVNAME=/dev/bus/usb/003/002
E: DEVNUM=002
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_FOR_SEAT=usb-pci-0000_39_00_0-usb-0_1
E: ID_MODEL=USB2.0_Hub
E: ID_MODEL_ENC=USB2.0\x20Hub\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_MODEL_ID=0006
E: ID_PATH=pci-0000:39:00.0-usb-0:1
E: ID_PATH_TAG=pci-0000_39_00_0-usb-0_1
E: ID_REVISION=9100
E: ID_SERIAL=VIA_Labs__Inc._USB2.0_Hub
E: ID_USB_INTERFACES=:090000:
E: ID_VENDOR=VIA_Labs__Inc.
E: ID_VENDOR_ENC=VIA\x20Labs\x2c\x20Inc.\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_VENDOR_ID=2230
E: MAJOR=189
E: MINOR=257
E: PRODUCT=2230/6/9100
E: SUBSYSTEM=usb
E: TAGS=:seat:
E: TYPE=9/0/1
A: authorized=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=9100
A: bmAttributes=e0
A: busnum=3
A: configuration=
H: descriptors=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
A: dev=189:257
A: devnum=2
A: devpath=1
L: driver=../../../../../../../../bus/usb/drivers/usb
A: idProduct=0006
A: idVendor=2230
A: ltm_capable=no
A: manufacturer=VIA Labs, Inc.
A: maxchild=4
L: port=../3-0:1.0/usb3-port1
A: power/active_duration=3602292
A: power/async=enabled
A: power/autosuspend=0
A: power/autosuspend_delay_ms=0
A: power/connected_duration=3602292
A: power/control=auto
A: power/level=auto
A: power/runtime_active_kids=1
A: power/runtime_active_time=3602016
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=USB2.0 Hub
A: quirks=0x0
A: removable=removable
A: speed=480
A: urbnum=31
A: version= 2.10
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0/usb3
N: bus/usb/003/001=12010002090001406B1D020015040302010109021900010100E0000904000001090000000705810304000C
E: BUSNUM=003
E: DEVNAME=/dev/bus/usb/003/001
E: DEVNUM=001
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_FOR_SEAT=usb-pci-0000_39_00_0
E: ID_MODEL=xHCI_Host_Controller
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
E: ID_MODEL_FROM_DATABASE=2.0 root hub
E: ID_MODEL_ID=0002
E: ID_PATH=pci-0000:39:00.0
E: ID_PATH_TAG=pci-0000_39_00_0
E: ID_REVISION=0415
E: ID_SERIAL=Linux_4.15.0-117-generic_xhci-hcd_xHCI_Host_Controller_0000:39:00.0
E: ID_SERIAL_SHORT=0000:39:00.0
E: ID_USB_INTERFACES=:090000:
E: ID_VENDOR=Linux_4.15.0-117-generic_xhci-hcd
E: ID_VENDOR_ENC=Linux\x204.15.0-117-generic\x20xhci-hcd
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
E: ID_VENDOR_ID=1d6b
E: MAJOR=189
E: MINOR=256
E: PRODUCT=1d6b/2/415
E: SUBSYSTEM=usb
E: TAGS=:seat:
E: TYPE=9/0/1
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=0415
A: bmAttributes=e0
A: busnum=3
A: configuration=
H: descriptors=12010002090001406B1D020015040302010109021900010100E0000904000001090000000705810304000C
A: dev=189:256
A: devnum=1
A: devpath=0
L: driver=../../../../../../../bus/usb/drivers/usb
A: idProduct=0002
A: idVendor=1d6b
A: interface_authorized_default=1
A: ltm_capable=no
A: manufacturer=Linux 4.15.0-117-generic xhci-hcd
A: maxchild=2
A: power/active_duration=3602700
A: power/async=enabled
A: power/autosuspend=0
A: power/autosuspend_delay_ms=0
A: power/connected_duration=3602700
A: power/control=auto
A: power/level=auto
A: power/runtime_active_kids=1
A: power/runtime_active_time=3602700
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: serial=0000:39:00.0
A: speed=480
A: urbnum=24
A: version= 2.00
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0
E: DRIVER=xhci_hcd
E: ID_MODEL_FROM_DATABASE=DSL6340 USB 3.1 Controller [Alpine Ridge]
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: MODALIAS=pci:v00008086d000015B5sv00002222sd00001111bc0Csc03i30
E: PCI_CLASS=C0330
E: PCI_ID=8086:15B5
E: PCI_SLOT_NAME=0000:39:00.0
E: PCI_SUBSYS_ID=2222:1111
E: SUBSYSTEM=pci
A: broken_parity_status=0
A: class=0x0c0330
H: config=8680B515060410000030030C200000000000F0D9000000000000000000000000000000000000000000000000222211110000000080000000000000000B010000
A: consistent_dma_mask_bits=64
A: current_link_speed=2.5 GT/s
A: current_link_width=4
A: d3cold_allowed=1
A: dbc=disabled
A: device=0x15b5
A: dma_mask_bits=64
L: driver=../../../../../../bus/pci/drivers/xhci_hcd
A: driver_override=(null)
A: enable=1
L: iommu=../../../../../virtual/iommu/dmar1
L: iommu_group=../../../../../../kernel/iommu_groups/17
A: irq=141
A: local_cpulist=0-3
A: local_cpus=f
A: max_link_speed=2.5 GT/s
A: max_link_width=4
A: modalias=pci:v00008086d000015B5sv00002222sd00001111bc0Csc03i30
A: msi_bus=1
A: msi_irqs/141=msi
A: numa_node=-1
A: pools=poolinfo - 0.1\nbuffer-2048 3 6 2048 3\nbuffer-512 12 16 512 2\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 15 15 2112 15\nxHCI ring segments 44 46 4096 46\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 3 32 128 1\nbuffer-32 0 0 32 0
A: power/async=enabled
A: power/control=on
A: power/runtime_active_kids=2
A: power/runtime_active_time=3602712
A: power/runtime_enabled=forbidden
A: power/runtime_status=active
A: power/runtime_suspended_time=0
A: power/runtime_usage=1
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=224549241
A: power/wakeup_max_time_ms=0
A: power/wakeup_total_time_ms=0
A: resource=0x00000000d9f00000 0x00000000d9f0ffff 0x0000000000040200\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=0x00
A: subsystem_device=0x1111
A: subsystem_vendor=0x2222
A: vendor=0x8086
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0
E: DRIVER=pcieport
E: ID_MODEL_FROM_DATABASE=DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015]
E: ID_PCI_CLASS_FROM_DATABASE=Bridge
E: ID_PCI_INTERFACE_FROM_DATABASE=Normal decode
E: ID_PCI_SUBCLASS_FROM_DATABASE=PCI bridge
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: MODALIAS=pci:v00008086d00001576sv00002222sd00001111bc06sc04i00
E: PCI_CLASS=60400
E: PCI_ID=8086:1576
E: PCI_SLOT_NAME=0000:02:02.0
E: PCI_SUBSYS_ID=2222:1111
E: SUBSYSTEM=pci
A: broken_parity_status=0
A: class=0x060400
H: config=86807615060410000000040620000100000000000000000002393900F1010000F0D9F0D9F1FF010000000000000000000000000080000000000000000B011000
A: consistent_dma_mask_bits=32
A: current_link_speed=2.5 GT/s
A: current_link_width=4
A: d3cold_allowed=1
A: device=0x1576
A: dma_mask_bits=32
L: driver=../../../../../bus/pci/drivers/pcieport
A: driver_override=(null)
A: enable=1
L: iommu=../../../../virtual/iommu/dmar1
L: iommu_group=../../../../../kernel/iommu_groups/17
A: irq=140
A: local_cpulist=0-3
A: local_cpus=f
A: max_link_speed=2.5 GT/s
A: max_link_width=4
A: modalias=pci:v00008086d00001576sv00002222sd00001111bc06sc04i00
A: msi_bus=1
A: msi_irqs/140=msi
A: numa_node=-1
A: power/async=enabled
A: power/clk_ctl=0
A: power/control=on
A: power/link_state=0
A: power/runtime_active_kids=1
A: power/runtime_active_time=3602728
A: power/runtime_enabled=forbidden
A: power/runtime_status=active
A: power/runtime_suspended_time=0
A: power/runtime_usage=2
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: resource=0x0000000000000000 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\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x00000000d9f00000 0x00000000d9ffffff 0x0000000000000200\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000
A: revision=0x00
A: secondary_bus_number=57
A: subordinate_bus_number=57
A: subsystem_device=0x1111
A: subsystem_vendor=0x2222
A: vendor=0x8086
P: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0
E: DRIVER=pcieport
E: ID_MODEL_FROM_DATABASE=DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015]
E: ID_PCI_CLASS_FROM_DATABASE=Bridge
E: ID_PCI_INTERFACE_FROM_DATABASE=Normal decode
E: ID_PCI_SUBCLASS_FROM_DATABASE=PCI bridge
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: MODALIAS=pci:v00008086d00001576sv00002222sd00001111bc06sc04i00
E: PCI_CLASS=60400
E: PCI_ID=8086:1576
E: PCI_SLOT_NAME=0000:01:00.0
E: PCI_SUBSYS_ID=2222:1111
E: SUBSYSTEM=pci
A: broken_parity_status=0
A: class=0x060400
H: config=86807615060410000000040620000100000000000000000001023900F101000000C400DA01A0F1C100000000000000000000000080000000000000000B011000
A: consistent_dma_mask_bits=32
A: current_link_speed=8 GT/s
A: current_link_width=2
A: d3cold_allowed=1
A: device=0x1576
A: dma_mask_bits=32
L: driver=../../../../bus/pci/drivers/pcieport
A: driver_override=(null)
A: enable=1
L: iommu=../../../virtual/iommu/dmar1
L: iommu_group=../../../../kernel/iommu_groups/14
A: irq=137
A: local_cpulist=0-3
A: local_cpus=f
A: max_link_speed=8 GT/s
A: max_link_width=4
A: modalias=pci:v00008086d00001576sv00002222sd00001111bc06sc04i00
A: msi_bus=1
A: msi_irqs/137=msi
A: numa_node=-1
A: power/async=enabled
A: power/control=on
A: power/runtime_active_kids=2
A: power/runtime_active_time=3602740
A: power/runtime_enabled=forbidden
A: power/runtime_status=active
A: power/runtime_suspended_time=0
A: power/runtime_usage=2
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=224549237
A: power/wakeup_max_time_ms=0
A: power/wakeup_total_time_ms=0
A: resource=0x0000000000000000 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\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x00000000c4000000 0x00000000da0fffff 0x0000000000000200\n0x00000000a0000000 0x00000000c1ffffff 0x0000000000102201\n0x0000000000000000 0x0000000000000000 0x0000000000000000
A: revision=0x00
A: secondary_bus_number=2
A: subordinate_bus_number=57
A: subsystem_device=0x1111
A: subsystem_vendor=0x2222
A: vendor=0x8086
P: /devices/pci0000:00/0000:00:1c.0
E: DRIVER=pcieport
E: ID_MODEL_FROM_DATABASE=Sunrise Point-LP PCI Express Root Port
E: ID_PCI_CLASS_FROM_DATABASE=Bridge
E: ID_PCI_INTERFACE_FROM_DATABASE=Normal decode
E: ID_PCI_SUBCLASS_FROM_DATABASE=PCI bridge
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: MODALIAS=pci:v00008086d00009D10sv00001028sd0000075Bbc06sc04i00
E: PCI_CLASS=60400
E: PCI_ID=8086:9D10
E: PCI_SLOT_NAME=0000:00:1c.0
E: PCI_SUBSYS_ID=1028:075B
E: SUBSYSTEM=pci
A: broken_parity_status=0
A: class=0x060400
H: config=8680109D07041000F1000406000081000000000000000000000139002020002000C400DA01A0F1C100000000000000000000000040000000000000000B011000
A: consistent_dma_mask_bits=32
A: current_link_speed=8 GT/s
A: current_link_width=2
A: d3cold_allowed=1
A: device=0x9d10
A: dma_mask_bits=32
L: driver=../../../bus/pci/drivers/pcieport
A: driver_override=(null)
A: enable=1
L: iommu=../../virtual/iommu/dmar1
L: iommu_group=../../../kernel/iommu_groups/6
A: irq=123
A: local_cpulist=0-3
A: local_cpus=f
A: max_link_speed=8 GT/s
A: max_link_width=2
A: modalias=pci:v00008086d00009D10sv00001028sd0000075Bbc06sc04i00
A: msi_bus=1
A: msi_irqs/123=msi
A: numa_node=-1
A: power/async=enabled
A: power/control=on
A: power/runtime_active_kids=1
A: power/runtime_active_time=228151860
A: power/runtime_enabled=forbidden
A: power/runtime_status=active
A: power/runtime_suspended_time=0
A: power/runtime_usage=2
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: resource=0x0000000000000000 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\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000002000 0x0000000000002fff 0x0000000000000100\n0x00000000c4000000 0x00000000da0fffff 0x0000000000000200\n0x00000000a0000000 0x00000000c1ffffff 0x0000000000102201\n0x0000000000000000 0x0000000000000000 0x0000000000000000
A: revision=0xf1
A: secondary_bus_number=1
A: subordinate_bus_number=57
A: subsystem_device=0x075b
A: subsystem_vendor=0x1028
A: vendor=0x8086

View File

@@ -17,6 +17,7 @@ envs.set('FP_DRIVERS_WHITELIST', 'virtual_image')
envs.set('NO_AT_BRIDGE', '1') envs.set('NO_AT_BRIDGE', '1')
drivers_tests = [ drivers_tests = [
'aes3500',
'elan', 'elan',
'synaptics', 'synaptics',
'vfs0050', 'vfs0050',