Commit Graph

7023 Commits

Author SHA1 Message Date
adamgene
8f786b0818 genesys: usbhub: Get dynamic ts info from device
1. add FuGenesysDynamicToolString.
2. extract running_bank / bonding from dynamic_ts.
2022-03-31 08:57:51 +01:00
adamgene
2868c924bc genesys: usbhub: Unsupport without tool string
1. Legacy device unsupported.
2. add fu_genesys_tsdigit_value() to convert ts corretly.
3. delete wrong checking tool_string_version in 0xff.
2022-03-31 08:57:51 +01:00
adamgene
852b94bbe1 genesys: usbhub: Read firmware size from blob
This fixes the firmware size of for the GL3590 chips.
2022-03-31 08:57:51 +01:00
Gaël PORTAY
cfb75f0da4 genesys: usbhub: Add genuine Genesys Logic USB Hub 2022-03-31 08:57:51 +01:00
Ryan Lee
d512410734 ccgx: Add trigger code to support future hardware 2022-03-31 08:46:15 +01:00
Richard Hughes
691166d203 trivial: Use a short string form for the CFI commands 2022-03-30 18:45:49 +01:00
Richard Hughes
04f00e8a17 trivial: Never return the invalid value from fu_progress_get_percentage() 2022-03-30 18:42:01 +01:00
Richard Hughes
3ce161dfc2 Show the device serial number and instance IDs by default
This is a feature that seems useful, but one that no vendor has actually
asked for. It's also of limited use for peripheral devices.

Showing the instance IDs by default is also going to make it much easier
to explain to hardware vendors where the GUIDs come from.

Fixes https://github.com/fwupd/fwupd/issues/4445
2022-03-30 13:21:55 +01:00
Richard Hughes
474a57b6f7 Allow overriding the detected machine type
This makes developing HSI tests and UIs much easier when using VMs or
containers.
2022-03-30 13:17:31 +01:00
Richard Hughes
2aed732249 nvme: Add signed-payload for Western Digital hardware 2022-03-30 08:19:22 +01:00
Richard Hughes
0eeaad76ec Modernize and refactor the requirement checking code
Before we had FuInstallTask which represented the specific install
action (install foo on bar), FuEngineRequest which described why the
install task was created, and FuEngine. The latter being both reposible
for calling *into* FuInstallTask and also *from* FuInstallTask as well.

Depending on the code, we had XbNodes of component and release, *and*
FwupdReleases as releases and lots of duplicated code to marshall the
former into various forms of the latter.

Create a FuRelease wrapper around FwupdRelease to replace FuInstallTask
and to simplify the code. Make the FuRelease builder do the device
requirement checks, and then use the engine to do checks requiring
engine state and context.
2022-03-30 08:17:24 +01:00
Richard Hughes
16edfd345e Correctly probe USB-2 hubs with more than 7 ports
See https://github.com/fwupd/fwupd/pull/4426#discussion_r836155609
2022-03-30 07:09:26 +01:00
herman lin
efa880eb0a elanfp: Modify for BULK_RECV_TIMEOUT_MS to 3000 2022-03-30 07:08:23 +01:00
herman lin
392fe20397 elanfp: Add PID 0x0C82 2022-03-30 07:08:23 +01:00
Mario Limonciello
5618cf41e8 trivial: bump python black version to fix CI 2022-03-29 16:03:52 -05:00
Richard Hughes
a7fb1d354c trivial: Only set to IDLE after auth actions have completed 2022-03-29 20:04:26 +01:00
Richard Hughes
fc011b593e trivial: Try to avoid creating new progressbar lines harder 2022-03-29 20:04:26 +01:00
Richard Hughes
dd3fc46786 trivial: Add some missing g_return_val_if_fail() calls 2022-03-29 20:04:26 +01:00
Richard Hughes
5817ef3b4f Emit 0% in FuProgress to show the child has started
This prevents showing the 'old' percentage until the first sub-task has
completed for some device firmware updates.
2022-03-29 20:04:26 +01:00
Richard Hughes
af7ce4c6af colorhug: Split up the writing and verifying
No logic changes.
2022-03-29 20:04:26 +01:00
Richard Hughes
4d330d92bc trivial: Do not set IDLE after parsing the firmware 2022-03-29 20:04:26 +01:00
Richard Hughes
50d9c545f2 Take a device inhibit when updating a device
This ensures that two different clients cannot update the same device,
as there's a window where we're waiting for the device to come back in
bootloader mode where we might accept a request from a different client.

As a side effect it also means we no longer store the UPDATABLE flag
in the history database -- which is fine as it's pretty useless anyway;
the device had to have been UPDATABLE to be updated in the first place.
2022-03-29 20:03:19 +01:00
Richard Hughes
37aac84d4c Never send the DeviceChanged signal with old data
If we connect up the device for property changes and then do an update,
we might send the pre-update GVariant data rather than the post-install
FuDevice.

This could mean that any client using the signal to update UI elements
might either flicker between the values, or show the 'wrong' device
version.
2022-03-29 14:32:51 +01:00
Richard Hughes
7f6605cf8d Revert "modem-manager: uninhibit modem after upgrade"
This reverts commit e3b62e643b which
fixes a crash when updating devices.
2022-03-28 20:19:09 +01:00
Richard Hughes
d005796af1 dfu: Add unsigned-payload for one of the demo devices 2022-03-28 15:40:30 +01:00
Richard Hughes
ce762c1d08 trivial: Use the correct struct offset for device requests 2022-03-28 15:08:16 +01:00
Richard Hughes
17854099d0 modem-manager: Add signed-payload metadata for some Quectel devices 2022-03-28 08:47:02 +01:00
Richard Hughes
d2adec18ca trivial: Add one more translated HSI result case 2022-03-28 08:27:58 +01:00
Richard Hughes
1cdc938fd8 trivial: Use #defines to avoid typos in the HSI translations 2022-03-28 08:27:58 +01:00
Richard Hughes
67c91a4cfd Detect SELinux before offering to install into /usr/local
Fixes https://github.com/fwupd/fwupd/issues/4080
2022-03-25 21:14:09 +00:00
Richard Hughes
897c6a47fa libfwupd: Add a FwupdRelease:remote-id property 2022-03-25 21:13:37 +00:00
Richard Hughes
ff4351d632 trivial: Fix a small memory leak when finding components
The docs of xb_silo_query_first_with_context() were wrong, it's always
(transfer full).
2022-03-25 21:12:53 +00:00
Richard Hughes
02dead17d4 trivial: Fix a small memory leak when unloading intel-spi 2022-03-25 21:12:53 +00:00
Richard Hughes
c1ff3e67af trivial: Fix a small memory leak when getting the udev parent 2022-03-25 21:12:53 +00:00
Mario Limonciello
1241e156b9 Don't export USB4 host controllers as updatable if they don't have unique GUIDs
Fixes: #4438
2022-03-24 16:44:27 +00:00
Richard Hughes
89e561c837 trivial: Show the update image in the CLI output 2022-03-24 15:54:12 +00:00
Richard Hughes
17c04e9824 Show the update message and update image in front end tools
We actually need to include the update image and message when creating
the GVariant.
2022-03-24 15:54:12 +00:00
Richard Hughes
acbba72b3b logitech-hidpp: Inherit the icon for the child device from the parent 2022-03-24 14:35:22 +00:00
Richard Hughes
ed247d32b2 modem-manager: Use the correct icon name
The list is specified in https://lvfs.readthedocs.io/en/latest/metainfo.html
2022-03-24 13:05:23 +00:00
Richard Hughes
e8e94b5c63 modem-manager: Quirk a vendor name to be less shouty 2022-03-24 11:12:13 +00:00
Richard Hughes
adc6f5bbf3 ata: Add signed-payload for more Phison devices 2022-03-24 08:08:39 +00:00
Gaël PORTAY
79228d8b7d genesys: usbhub: Remove unnecessary local 2022-03-23 21:45:58 +00:00
Gaël PORTAY
b2f3e57418 genesys: usbhub: Move instruction in else statement 2022-03-23 21:45:58 +00:00
Gaël PORTAY
1ade02e944 genesys: usbhub: Reuse attribute fw_data_total_count
This uses the attribute fw_data_total_count to set the firmware size,
and decreases the duplication of constants.
2022-03-23 21:45:58 +00:00
Gaël PORTAY
859a1e2f42 genesys: usbhub: Decrease hardcoded constants
This adds new defines to decrease the use of hardcoded constant in the
code.
2022-03-23 21:45:58 +00:00
Gaël PORTAY
13ad6125a4 genesys: usbhub: Move some code to common
This moves some code to common and reuses a constant to decrease
hardcoded constants.
2022-03-23 21:45:58 +00:00
Gaël PORTAY
737443d73c genesys: usbhub: Fix firmware size for GL3590 hubs 2022-03-23 21:45:58 +00:00
Kai Michaelis
0812ce5d20 tpm: Fix eventlog replay for Intel TXT machines 2022-03-23 21:18:46 +00:00
Gaël PORTAY
c6c64bd8dc genesys: Add since version comment for private flags
This tags when the private flags has been introduced.
2022-03-23 20:46:39 +00:00
Gaël PORTAY
d056b382dd genesys: usbhub: Add has-public-key private flag
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.
2022-03-23 20:46:39 +00:00