From d6334a7a4ce57092d426c5016aed286c61b3bffb Mon Sep 17 00:00:00 2001 From: Tamer Hassan Date: Sat, 9 Mar 2024 12:20:15 +0400 Subject: [PATCH] egismoc: add 0587 support (also supports 0586 but missing device file) --- data/autosuspend.hwdb | 1 + libfprint/drivers/egismoc/egismoc.c | 80 ++++++++- libfprint/drivers/egismoc/egismoc.h | 7 +- tests/egismoc-0587/custom.pcapng | Bin 0 -> 92988 bytes tests/egismoc-0587/custom.py | 156 ++++++++++++++++ tests/egismoc-0587/device | 270 ++++++++++++++++++++++++++++ tests/meson.build | 1 + 7 files changed, 508 insertions(+), 7 deletions(-) create mode 100644 tests/egismoc-0587/custom.pcapng create mode 100755 tests/egismoc-0587/custom.py create mode 100644 tests/egismoc-0587/device diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb index 74ac65b0..d8a112b0 100644 --- a/data/autosuspend.hwdb +++ b/data/autosuspend.hwdb @@ -79,6 +79,7 @@ usb:v1C7Ap0571* # Supported by libfprint driver egismoc usb:v1C7Ap0582* +usb:v1C7Ap0587* usb:v1C7Ap05A1* ID_AUTOSUSPEND=1 ID_PERSIST=0 diff --git a/libfprint/drivers/egismoc/egismoc.c b/libfprint/drivers/egismoc/egismoc.c index 336ea53c..97997a2d 100644 --- a/libfprint/drivers/egismoc/egismoc.c +++ b/libfprint/drivers/egismoc/egismoc.c @@ -43,14 +43,20 @@ struct _FpiDeviceEgisMoc FpiSsm *cmd_ssm; FpiUsbTransfer *cmd_transfer; GCancellable *interrupt_cancellable; - GPtrArray *enrolled_ids; + gint max_enroll_stages; }; G_DEFINE_TYPE (FpiDeviceEgisMoc, fpi_device_egismoc, FP_TYPE_DEVICE); static const FpIdEntry egismoc_id_table[] = { { .vid = 0x1c7a, .pid = 0x0582, .driver_data = EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 }, + /* + * 0x0586 is supported in the same way as 0587 per user report, but missing submission of device file to be included + * + * { .vid = 0x1c7a, .pid = 0x0586, .driver_data = EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 | EGISMOC_DRIVER_MAX_ENROLL_STAGES_20 }, + */ + { .vid = 0x1c7a, .pid = 0x0587, .driver_data = EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 | EGISMOC_DRIVER_MAX_ENROLL_STAGES_20 }, { .vid = 0x1c7a, .pid = 0x05a1, .driver_data = EGISMOC_DRIVER_CHECK_PREFIX_TYPE2 }, { .vid = 0, .pid = 0, .driver_data = 0 } }; @@ -769,7 +775,7 @@ egismoc_enroll_status_report (FpDevice *device, enroll_print->stage++; fp_info ("Partial capture successful. Please touch the sensor again (%d/%d)", enroll_print->stage, - EGISMOC_MAX_ENROLL_NUM); + self->max_enroll_stages); fpi_device_enroll_progress (device, enroll_print->stage, enroll_print->print, NULL); break; @@ -849,7 +855,7 @@ egismoc_read_capture_cb (FpDevice *device, egismoc_enroll_status_report (device, enroll_print, ENROLL_STATUS_RETRY, error); } - if (enroll_print->stage == EGISMOC_ENROLL_TIMES) + if (enroll_print->stage == self->max_enroll_stages) fpi_ssm_next_state (self->task_ssm); else fpi_ssm_jump_to_state (self->task_ssm, ENROLL_CAPTURE_SENSOR_RESET); @@ -1460,6 +1466,71 @@ egismoc_dev_init_handler (FpiSsm *ssm, NULL); } +static void +egismoc_probe (FpDevice *device) +{ + GUsbDevice *usb_dev; + GError *error = NULL; + g_autofree gchar *serial = NULL; + FpiDeviceEgisMoc *self = FPI_DEVICE_EGISMOC (device); + + fp_dbg ("%s enter --> ", G_STRFUNC); + + /* Claim usb interface */ + usb_dev = fpi_device_get_usb_device (device); + if (!g_usb_device_open (usb_dev, &error)) + { + fp_dbg ("%s g_usb_device_open failed %s", G_STRFUNC, error->message); + fpi_device_probe_complete (device, NULL, NULL, error); + return; + } + + if (!g_usb_device_reset (usb_dev, &error)) + { + fp_dbg ("%s g_usb_device_reset failed %s", G_STRFUNC, error->message); + g_usb_device_close (usb_dev, NULL); + fpi_device_probe_complete (device, NULL, NULL, error); + return; + } + + if (!g_usb_device_claim_interface (usb_dev, 0, 0, &error)) + { + fp_dbg ("%s g_usb_device_claim_interface failed %s", G_STRFUNC, error->message); + g_usb_device_close (usb_dev, NULL); + fpi_device_probe_complete (device, NULL, NULL, error); + return; + } + + if (g_strcmp0 (g_getenv ("FP_DEVICE_EMULATION"), "1") == 0) + serial = g_strdup ("emulated-device"); + else + serial = g_usb_device_get_string_descriptor (usb_dev, + g_usb_device_get_serial_number_index (usb_dev), + &error); + + if (error) + { + fp_dbg ("%s g_usb_device_get_string_descriptor failed %s", G_STRFUNC, error->message); + g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (device)), + 0, 0, NULL); + g_usb_device_close (usb_dev, NULL); + fpi_device_probe_complete (device, NULL, NULL, error); + return; + } + + if (fpi_device_get_driver_data (device) & EGISMOC_DRIVER_MAX_ENROLL_STAGES_20) + self->max_enroll_stages = 20; + else + self->max_enroll_stages = EGISMOC_MAX_ENROLL_STAGES_DEFAULT; + + fpi_device_set_nr_enroll_stages (device, self->max_enroll_stages); + + g_usb_device_release_interface (fpi_device_get_usb_device (FP_DEVICE (device)), 0, 0, NULL); + g_usb_device_close (usb_dev, NULL); + + fpi_device_probe_complete (device, serial, NULL, error); +} + static void egismoc_open (FpDevice *device) { @@ -1540,10 +1611,11 @@ fpi_device_egismoc_class_init (FpiDeviceEgisMocClass *klass) dev_class->type = FP_DEVICE_TYPE_USB; dev_class->scan_type = FP_SCAN_TYPE_PRESS; dev_class->id_table = egismoc_id_table; - dev_class->nr_enroll_stages = EGISMOC_ENROLL_TIMES; + dev_class->nr_enroll_stages = EGISMOC_MAX_ENROLL_STAGES_DEFAULT; /* device should be "always off" unless being used */ dev_class->temp_hot_seconds = 0; + dev_class->probe = egismoc_probe; dev_class->open = egismoc_open; dev_class->cancel = egismoc_cancel; dev_class->suspend = egismoc_suspend; diff --git a/libfprint/drivers/egismoc/egismoc.h b/libfprint/drivers/egismoc/egismoc.h index f027ea23..ef31d2cd 100644 --- a/libfprint/drivers/egismoc/egismoc.h +++ b/libfprint/drivers/egismoc/egismoc.h @@ -36,6 +36,7 @@ G_DECLARE_FINAL_TYPE (FpiDeviceEgisMoc, fpi_device_egismoc, FPI, DEVICE_EGISMOC, #define EGISMOC_DRIVER_CHECK_PREFIX_TYPE1 (1 << 0) #define EGISMOC_DRIVER_CHECK_PREFIX_TYPE2 (1 << 1) +#define EGISMOC_DRIVER_MAX_ENROLL_STAGES_20 (1 << 2) #define EGISMOC_EP_CMD_OUT (0x02 | FPI_USB_ENDPOINT_OUT) #define EGISMOC_EP_CMD_IN (0x81 | FPI_USB_ENDPOINT_IN) @@ -49,7 +50,7 @@ G_DECLARE_FINAL_TYPE (FpiDeviceEgisMoc, fpi_device_egismoc, FPI, DEVICE_EGISMOC, #define EGISMOC_USB_IN_RECV_LENGTH 4096 #define EGISMOC_USB_INTERRUPT_IN_RECV_LENGTH 64 -#define EGISMOC_ENROLL_TIMES 10 +#define EGISMOC_MAX_ENROLL_STAGES_DEFAULT 10 #define EGISMOC_MAX_ENROLL_NUM 10 #define EGISMOC_FINGERPRINT_DATA_SIZE 32 #define EGISMOC_LIST_RESPONSE_PREFIX_SIZE 14 @@ -100,11 +101,11 @@ static guchar cmd_read_capture[] = {0x00, 0x00, 0x00, 0x07, 0x50, 0x16, 0x02, 0x static gsize cmd_read_capture_len = sizeof (cmd_read_capture) / sizeof (cmd_read_capture[0]); static guchar rsp_read_success_prefix[] = {0x00, 0x00, 0x00, 0x04}; static gsize rsp_read_success_prefix_len = sizeof (rsp_read_success_prefix) / sizeof (rsp_read_success_prefix[0]); -static guchar rsp_read_success_suffix[] = {0x0a, 0x90, 0x00}; +static guchar rsp_read_success_suffix[] = {0x90, 0x00}; static gsize rsp_read_success_suffix_len = sizeof (rsp_read_success_suffix) / sizeof (rsp_read_success_suffix[0]); static guchar rsp_read_offcenter_prefix[] = {0x00, 0x00, 0x00, 0x04}; static gsize rsp_read_offcenter_prefix_len = sizeof (rsp_read_offcenter_prefix) / sizeof (rsp_read_offcenter_prefix[0]); -static guchar rsp_read_offcenter_suffix[] = {0x0a, 0x64, 0x91}; +static guchar rsp_read_offcenter_suffix[] = {0x64, 0x91}; static gsize rsp_read_offcenter_suffix_len = sizeof (rsp_read_offcenter_suffix) / sizeof (rsp_read_offcenter_suffix[0]); static guchar rsp_read_dirty_prefix[] = {0x00, 0x00, 0x00, 0x02, 0x64}; static gsize rsp_read_dirty_prefix_len = sizeof (rsp_read_dirty_prefix) / sizeof (rsp_read_dirty_prefix[0]); diff --git a/tests/egismoc-0587/custom.pcapng b/tests/egismoc-0587/custom.pcapng new file mode 100644 index 0000000000000000000000000000000000000000..c721929c2e46976dceaf808a77f9e30df486a586 GIT binary patch literal 92988 zcmd5_2bdJa*6j`CC>co$C^_d$69hq!Rm23mHwp+yT2U19AecaL5s|2(pd#`s7*JGj z5J55`Nuq%y3Wy*m=bdh!-1koP0Yvbwjb zd1VqjUzR1=YGBoGc;BG3&I5+0bs2u&fT7iHte)0k#K-~FZt7k=ZE*A2^&2*?SMS=i zY7Y#CPxb71O`|#us#{iyRl@2vc=)K%X-(=hsZ+0Z{YJG14j4XQxHm?iE{W*9UAY z*j8-kwNUp!wL>XZvX#pkb?=?SMhtIg<$`u%f!A0g#q`XNA|^yMP$ddH zN&Gy?Rjs5XYjy*83psc!_W+j-?_(t{uFoI9g|SqH&tMU;&?|U@#qx~vDWQMsC+74X z2(PgcKG$dIPa+mXG*Bf9Jn>laq{5&8rL0^z#w5emTse}()7TW-%3&ctkF)ZWMJmqV zKzAOVl6lzggS@`;u-40qR2~vO#Yy->Kg{dIl&C!X7C3D{#7dl`9dQ=^NW?__>P5TD zQx_@i2%pE)_G1y#zp35p(_+W@6SMY1TZ?GJF#QBuS(Y@0b^}Zcm zV~rGNxlcr#SHfqoW+@W?%9Q$6bE}!v2)w?jm2P#gdcmuP@Y=GFljr5xS>a-{&>t<* zu<2(aHpQ6--8yRtz*`)@*Q;6aJ0v51?KXrz<#Q2RRz&wZ;qZsf&Wg`-aKTd1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Sz1LFX2cM>x+!_sk)xSm;XK0NGpKJ8R-`+He=J};x(eZ?ylJUs39rFC0 zmqk2IpJKnt63;w8?^PX@=Mz48enGjmGrnW?t?fKkrK9rv&{)z_1OP^G^jk>ai{HDNhOi-q-b-M_50M zW1esRcJY748CofSbZfP5t~aeNb^-x%rI)~Owx>ZwKJLrk1FsG5V+~1OuGOt?`qyf} zQ(5t89gh0);9K6bGS?0ssoY8VzHYyh3l`yD?BMOXkZpsZGmw6CE@1k{-Ud6}U zU8&xV2cqr22OjF8#yEL59amG{9M0+Om@U>EYa4Ld(6?BLlWWu~m;Yn7D~@P<+P`v* zCgt&e%=Q%Er$gJZ5ayM|R9Z{q!C1V)3K%F9i&Ic5F)cgX;L#xknYPGe0&Z{7rCw zOf1=@Gw!RfU|ue+)>Z90`5FYZw~71>!^ZG8SR)l0&z)w$C#t5G!f$)J_nl$V6F!6O z;p4GNb*&S%i;wrWpj}v^wF$QepmO}5Y8d#m_9X8iKylx3owq#5Kr$%UuPbtPSH7&) zp5(o&3BN;CZ}+<3`%ZJb_R8B`jo090nt!|JK-+3~`wmz)ai>--TR_$SP7r+KU*~y?XL%)!J4HoU+(rIe4XS9QYhQgO{CLdKO~f0oueOWmt6_HQpi?+s{S(?{!#1bNcJc9g zAG8aLA76d8w#E0g!O0%lSJgd{ z+`d|?sQ8{4j*DnxgZ7W{`07dEwE+*SzE_gN+lI#DNZ`d1jT5&Apz{6SV}Ba>>i$*k m`R=7+{=W}+0r1m-7puNkm3s}~;o{zOx;z5Fk_TMEeE5F>3ZJ_G literal 0 HcmV?d00001 diff --git a/tests/egismoc-0587/custom.py b/tests/egismoc-0587/custom.py new file mode 100755 index 00000000..3a662380 --- /dev/null +++ b/tests/egismoc-0587/custom.py @@ -0,0 +1,156 @@ +#!/usr/bin/python3 + +import traceback +import sys +import time +import gi + +gi.require_version('FPrint', '2.0') +from gi.repository import FPrint, GLib + +# Exit with error on any exception, included those happening in async callbacks +sys.excepthook = lambda *args: (traceback.print_exception(*args), sys.exit(1)) + +ctx = GLib.main_context_default() + +c = FPrint.Context() +c.enumerate() +devices = c.get_devices() + +d = devices[0] +del devices + +d.open_sync() + +assert d.get_driver() == "egismoc" +assert not d.has_feature(FPrint.DeviceFeature.CAPTURE) +assert d.has_feature(FPrint.DeviceFeature.IDENTIFY) +assert d.has_feature(FPrint.DeviceFeature.VERIFY) +assert d.has_feature(FPrint.DeviceFeature.DUPLICATES_CHECK) +assert d.has_feature(FPrint.DeviceFeature.STORAGE) +assert d.has_feature(FPrint.DeviceFeature.STORAGE_LIST) +assert d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE) +assert d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR) + +def enroll_progress(*args): + print("finger status: ", d.get_finger_status()) + print('enroll progress: ' + str(args)) + +def identify_done(dev, res): + global identified + identified = True + identify_match, identify_print = dev.identify_finish(res) + print('indentification_done: ', identify_match, identify_print) + assert identify_match.equal(identify_print) + +# Beginning with list and clear assumes you begin with >0 prints enrolled before capturing + +print("listing - device should have prints") +stored = d.list_prints_sync() +assert len(stored) > 0 +del stored + +print("clear device storage") +d.clear_storage_sync() +print("clear done") + +print("listing - device should be empty") +stored = d.list_prints_sync() +assert len(stored) == 0 +del stored + +print("enrolling") +template = FPrint.Print.new(d) +template.set_finger(FPrint.Finger.LEFT_INDEX) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +p1 = d.enroll_sync(template, None, enroll_progress, None) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +print("enroll done") +del template + +print("listing - device should have 1 print") +stored = d.list_prints_sync() +assert len(stored) == 1 +assert stored[0].equal(p1) + +print("verifying") +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +verify_res, verify_print = d.verify_sync(p1) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +print("verify done") +assert verify_res == True + +identified = False +deserialized_prints = [] +for p in stored: + deserialized_prints.append(FPrint.Print.deserialize(p.serialize())) + assert deserialized_prints[-1].equal(p) +del stored + +print('async identifying') +d.identify(deserialized_prints, callback=identify_done) +del deserialized_prints + +while not identified: + ctx.iteration(True) + +print("try to enroll duplicate") +template = FPrint.Print.new(d) +template.set_finger(FPrint.Finger.RIGHT_INDEX) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +try: + d.enroll_sync(template, None, enroll_progress, None) +except GLib.Error as error: + assert error.matches(FPrint.DeviceError.quark(), + FPrint.DeviceError.DATA_DUPLICATE) +except Exception as exc: + raise +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +print("duplicate enroll attempt done") + +print("listing - device should still only have 1 print") +stored = d.list_prints_sync() +assert len(stored) == 1 +assert stored[0].equal(p1) +del stored + +print("enroll new finger") +template = FPrint.Print.new(d) +template.set_finger(FPrint.Finger.RIGHT_INDEX) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +p2 = d.enroll_sync(template, None, enroll_progress, None) +assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE +print("enroll new finger done") +del template + +print("listing - device should have 2 prints") +stored = d.list_prints_sync() +assert len(stored) == 2 +assert (stored[0].equal(p1) and stored[1].equal(p2)) or (stored[0].equal(p2) and stored[1].equal(p1)) +del stored + +print("deleting first print") +d.delete_print_sync(p1) +print("delete done") +del p1 + +print("listing - device should only have second print") +stored = d.list_prints_sync() +assert len(stored) == 1 +assert stored[0].equal(p2) +del stored +del p2 + +print("clear device storage") +d.clear_storage_sync() +print("clear done") + +print("listing - device should be empty") +stored = d.list_prints_sync() +assert len(stored) == 0 +del stored + +d.close_sync() + +del d +del c diff --git a/tests/egismoc-0587/device b/tests/egismoc-0587/device new file mode 100644 index 00000000..91744df1 --- /dev/null +++ b/tests/egismoc-0587/device @@ -0,0 +1,270 @@ +P: /devices/pci0000:00/0000:00:14.0/usb3/3-5 +N: bus/usb/003/009=12010002FF0000407A1C870567640102030109022700010100A0320904000003FF000000070581020002000705020200020007058303400005 +E: BUSNUM=003 +E: DEVNAME=/dev/bus/usb/003/009 +E: DEVNUM=009 +E: DEVTYPE=usb_device +E: DRIVER=usb +E: ID_AUTOSUSPEND=1 +E: ID_BUS=usb +E: ID_MODEL=ETU905A88-E +E: ID_MODEL_ENC=ETU905A88-E +E: ID_MODEL_ID=0587 +E: ID_PATH=pci-0000:00:14.0-usb-0:5 +E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_5 +E: ID_PATH_WITH_USB_REVISION=pci-0000:00:14.0-usbv2-0:5 +E: ID_PERSIST=0 +E: ID_REVISION=6467 +E: ID_SERIAL=EGIS_ETU905A88-E_198427PCU834 +E: ID_SERIAL_SHORT=198427PCU834 +E: ID_USB_INTERFACES=:ff0000: +E: ID_USB_MODEL=ETU905A88-E +E: ID_USB_MODEL_ENC=ETU905A88-E +E: ID_USB_MODEL_ID=0587 +E: ID_USB_REVISION=6467 +E: ID_USB_SERIAL=EGIS_ETU905A88-E_198427PCU834 +E: ID_USB_SERIAL_SHORT=198427PCU834 +E: ID_USB_VENDOR=EGIS +E: ID_USB_VENDOR_ENC=EGIS +E: ID_USB_VENDOR_ID=1c7a +E: ID_VENDOR=EGIS +E: ID_VENDOR_ENC=EGIS +E: ID_VENDOR_FROM_DATABASE=LighTuning Technology Inc. +E: ID_VENDOR_ID=1c7a +E: MAJOR=189 +E: MINOR=264 +E: PRODUCT=1c7a/587/6467 +E: SUBSYSTEM=usb +E: TYPE=255/0/0 +A: authorized=1\n +A: avoid_reset_quirk=0\n +A: bConfigurationValue=1\n +A: bDeviceClass=ff\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=6467\n +A: bmAttributes=a0\n +A: busnum=3\n +A: configuration= +H: descriptors=12010002FF0000407A1C870567640102030109022700010100A0320904000003FF000000070581020002000705020200020007058303400005 +A: dev=189:264\n +A: devnum=9\n +A: devpath=5\n +L: driver=../../../../../bus/usb/drivers/usb +L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4e/device:4f/device:54 +A: idProduct=0587\n +A: idVendor=1c7a\n +A: ltm_capable=no\n +A: manufacturer=EGIS\n +A: maxchild=0\n +A: physical_location/dock=no\n +A: physical_location/horizontal_position=left\n +A: physical_location/lid=no\n +A: physical_location/panel=top\n +A: physical_location/vertical_position=upper\n +L: port=../3-0:1.0/usb3-port5 +A: power/active_duration=58096\n +A: power/async=enabled\n +A: power/autosuspend=2\n +A: power/autosuspend_delay_ms=2000\n +A: power/connected_duration=183928\n +A: power/control=auto\n +A: power/level=auto\n +A: power/persist=0\n +A: power/runtime_active_kids=0\n +A: power/runtime_active_time=58510\n +A: power/runtime_enabled=enabled\n +A: power/runtime_status=active\n +A: power/runtime_suspended_time=125136\n +A: power/runtime_usage=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=ETU905A88-E\n +A: quirks=0x0\n +A: removable=fixed\n +A: rx_lanes=1\n +A: serial=198427PCU834\n +A: speed=480\n +A: tx_lanes=1\n +A: urbnum=547\n +A: version= 2.00\n + +P: /devices/pci0000:00/0000:00:14.0/usb3 +N: bus/usb/003/001=12010002090001406B1D020006060302010109021900010100E0000904000001090000000705810304000C +E: BUSNUM=003 +E: CURRENT_TAGS=:seat: +E: DEVNAME=/dev/bus/usb/003/001 +E: DEVNUM=001 +E: DEVTYPE=usb_device +E: DRIVER=usb +E: ID_AUTOSUSPEND=1 +E: ID_BUS=usb +E: ID_FOR_SEAT=usb-pci-0000_00_14_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:00:14.0 +E: ID_PATH_TAG=pci-0000_00_14_0 +E: ID_REVISION=0606 +E: ID_SERIAL=Linux_6.6.0-14-generic_xhci-hcd_xHCI_Host_Controller_0000:00:14.0 +E: ID_SERIAL_SHORT=0000:00:14.0 +E: ID_USB_INTERFACES=:090000: +E: ID_USB_MODEL=xHCI_Host_Controller +E: ID_USB_MODEL_ENC=xHCI\x20Host\x20Controller +E: ID_USB_MODEL_ID=0002 +E: ID_USB_REVISION=0606 +E: ID_USB_SERIAL=Linux_6.6.0-14-generic_xhci-hcd_xHCI_Host_Controller_0000:00:14.0 +E: ID_USB_SERIAL_SHORT=0000:00:14.0 +E: ID_USB_VENDOR=Linux_6.6.0-14-generic_xhci-hcd +E: ID_USB_VENDOR_ENC=Linux\x206.6.0-14-generic\x20xhci-hcd +E: ID_USB_VENDOR_ID=1d6b +E: ID_VENDOR=Linux_6.6.0-14-generic_xhci-hcd +E: ID_VENDOR_ENC=Linux\x206.6.0-14-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/606 +E: SUBSYSTEM=usb +E: TAGS=:seat: +E: TYPE=9/0/1 +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=0606\n +A: bmAttributes=e0\n +A: busnum=3\n +A: configuration= +H: descriptors=12010002090001406B1D020006060302010109021900010100E0000904000001090000000705810304000C +A: dev=189:256\n +A: devnum=1\n +A: devpath=0\n +L: driver=../../../../bus/usb/drivers/usb +L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4e/device:4f +A: idProduct=0002\n +A: idVendor=1d6b\n +A: interface_authorized_default=1\n +A: ltm_capable=no\n +A: manufacturer=Linux 6.6.0-14-generic xhci-hcd\n +A: maxchild=12\n +A: power/active_duration=5145268\n +A: power/async=enabled\n +A: power/autosuspend=0\n +A: power/autosuspend_delay_ms=0\n +A: power/connected_duration=5191200\n +A: power/control=auto\n +A: power/level=auto\n +A: power/runtime_active_kids=2\n +A: power/runtime_active_time=5145262\n +A: power/runtime_enabled=enabled\n +A: power/runtime_status=active\n +A: power/runtime_suspended_time=45937\n +A: power/runtime_usage=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=637\n +A: version= 2.00\n + +P: /devices/pci0000:00/0000:00:14.0 +E: DRIVER=xhci_hcd +E: ID_AUTOSUSPEND=1 +E: ID_MODEL_FROM_DATABASE=Alder Lake PCH USB 3.2 xHCI Host Controller +E: ID_PATH=pci-0000:00:14.0 +E: ID_PATH_TAG=pci-0000_00_14_0 +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:v00008086d000051EDsv00001043sd0000201Fbc0Csc03i30 +E: PCI_CLASS=C0330 +E: PCI_ID=8086:51ED +E: PCI_SLOT_NAME=0000:00:14.0 +E: PCI_SUBSYS_ID=1043:201F +E: SUBSYSTEM=pci +A: ari_enabled=0\n +A: broken_parity_status=0\n +A: class=0x0c0330\n +H: config=8680ED51060490020130030C000080000400262F62000000000000000000000000000000000000000000000043101F20000000007000000000000000FF010000FD0134A089C27F8000000000000000003F6DD80F000000000000000000000000316000000000000000000000000000000180C2C1080000000000000000000000059087001805E0FE000000000000000009B014F01000400100000000C10A080000080E00001800008F50020000010000090000018680C00009001014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B50F110112000000 +A: consistent_dma_mask_bits=64\n +A: d3cold_allowed=1\n +A: dbc=disabled\n +A: dbc_bInterfaceProtocol=01\n +A: dbc_bcdDevice=0010\n +A: dbc_idProduct=0010\n +A: dbc_idVendor=1d6b\n +A: device=0x51ed\n +A: dma_mask_bits=64\n +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:4e +A: index=10\n +L: iommu=../../virtual/iommu/dmar1 +L: iommu_group=../../../kernel/iommu_groups/11 +A: irq=145\n +A: label=Onboard - Other\n +A: local_cpulist=0-19\n +A: local_cpus=fffff\n +A: modalias=pci:v00008086d000051EDsv00001043sd0000201Fbc0Csc03i30\n +A: msi_bus=1\n +A: msi_irqs/145=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 1 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 10 11 2112 11\nxHCI ring segments 38 38 4096 38\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/async=enabled\n +A: power/control=auto\n +A: power/runtime_active_kids=2\n +A: power/runtime_active_time=5192072\n +A: power/runtime_enabled=enabled\n +A: power/runtime_status=active\n +A: power/runtime_suspended_time=0\n +A: power/runtime_usage=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=0x000000622f260000 0x000000622f26ffff 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=0x01\n +A: subsystem_device=0x201f\n +A: subsystem_vendor=0x1043\n +A: vendor=0x8086\n + diff --git a/tests/meson.build b/tests/meson.build index dc3b70e2..7a7afc03 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -53,6 +53,7 @@ drivers_tests = [ 'egis0570', 'egismoc', 'egismoc-05a1', + 'egismoc-0587', 'fpcmoc', 'realtek', 'focaltech_moc', -- GitLab