This allows us to print better warning strings, and in the future
would allow us to profile each operation in a meaningful way.
Also, add context to some of the progress steps as required.
This allows creating the silo when starting the engine with custom
plugin keys such as WacomI2cFlashBaseAddr.
If we move the plugin initialization earlier then we don't get the
HwID matches, so we really do have to split this into a 4-stage startup,
e.g. ->load(), ->init(), ->startup() and ->coldplug().
The PORTNUM is composed of two bytes values that are ASCII encoded: the
super-speed and high speed port numbers.
The result is PORTNUM_3434 for an usbhub device of 4/4 ports; 34 is the
ASCII encoded value for the character '4'.
The value PORTNUM_3434 is not straightforward if read by humans; however
PORTNUM_44 is more explicit.
This change encodes the two port numbers into a single byte instead of
ASCII-encoding to a 16-bits integer.
Example:
XPS 13 9370
│
└─USB2.0 Hub:
Device ID: 84d0e3f2a0f8b2328f7995767b23ebb40494723f
Current version: 92.24
Vendor: GenesysLogic (USB:0x05E3)
GUIDs: 0cdb6604-d595-5ca3-8da0-d05cb1b71ac1 ← USB\VID_05E3&PID_0610
ce9a28b1-f064-5b5a-b71b-3dea05905aea ← USB\VID_05E3&PID_0610&REV_9224
e89cae82-9975-55fb-802f-63d27dbcec19 ← VID\PID_0610&HUB_00
2ae5ae36-cf86-5486-bff2-1bfd30e0ac6d ← USB\VID_05E3&PID_0610&IC_352122
242eea14-5dfe-55d9-9d30-acfa9ec6a9a5 ← USB\VID_05E3&PID_0610&IC_352122&BONDING_00
f68080bb-3713-5154-9890-44fbd833d678 ← USB\VID_05E3&PID_0610&VENDOR_GENESYSLOGIC&IC_352122&BONDING_00&PORTNUM_44&VENDORSUP_E8A9A9E4-6C17-5F9C-B7BD-CDA49FE66D75
Device Flags: • Updatable
• Unsigned Payload
The Genesys Logic USB Hub does have support for public-key.
This adds the private flag has-public-key, and sets that flag for the HP
USB Hubs only. Also, this authenticates during setup only if that flag
is set.
The HP M2xfd monitors use GenesysLogic GL3523 USB Hub and provides their
own firmwares. Furthermore, HP uses the same VID/PID for other USB Hubs
products, with a different public-key; the HP M24fd and M27fd use
different public-key.
This appends the public-key to the instance-id string to make the
distinction between all the HP USB Hubs, and prevents to install a
firmware with the wrong public-key.
Genesys Logic uses the same VID/PID for its USB Hubs products, whatever
the chip underneath (GL3523, GL3590...). For example, Genesys Logic
USB2.0 Hub uses 05E3/0610; and Genesys Logic USB3.1 Hub uses 05E3/0612.
The manufacturers may reuse the Genesys Logic VID/PID for its products
or may use its own VID such as HP (03F0).
The genesys plugin supports upgrading GL3523 USB and GL3590 USB2.0 Hubs
for now (the latter is not tested).
The quirk file limits the support to HP Hubs only; and the plugin will
allow upgrade Hub with genuine Genesys Logic VID/PID in the future by
adding the following lines to the quirk file:
[USB\VID_05E3&PID_0610]
Plugin = genesys
However, this change in the quirk file will report the errors below for
the Hub with IC that are not supported:
04:26:40:0325 FuEngine failed to add device usb:01:00:01: Unsupported IC GL3521-22
04:26:40:0344 FuEngine failed to add device usb:01:00:01: Unsupported IC GL3521-22
Note: This may be true already if HP uses Hubs with IC that are not
unsupported.
This change returns the error FWUPD_ERROR_NOT_SUPPORTED instead to fail
silently.
The plugin gets the panel-type (i.e. hardware revision) as the firmware
version.
This gets the real firmware version, and appends the panel-type to the
instance-id string as the blobs are specific to panel-types.
The Special Protect Sector structure is 24-bit long.
This replaces the 32-bit integer in union that makes the structure
8-bits too big by an array of 3-bytes.
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.
Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
tristate features will automatically disable if dependencies marked
as required are missing.
Packagers can manually override using `auto_features`.
Link: https://mesonbuild.com/Build-options.html#features