Commit Graph

250 Commits

Author SHA1 Message Date
Yehezkel Bernat
e43f7fb655 trivial: cleanup for many compilation warnings from clang
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 10:43:15 +01:00
Mario Limonciello
f1cc61d2f0 trivial: dell: TPM switching blacklist->whitelist
It's been decided that TPM mode switching won't be supported
on any other new platforms.  Instead of blacklisting the outliers
whitelist the (smaller) list of platforms that do support the
feature.
2017-08-29 16:37:14 -05:00
Mario Limonciello
f30a1cbaa1 synapticsmst: use hwid to match supported systems
This is to help break the dependence on the Dell plugin during
initalization.

NOTE: there are corner cases that this plugin will no longer
detect Dell systems now, but these are expected to be rare.
2017-08-29 16:37:14 -05:00
Mario Limonciello
257c14ebd1 dell: prefer to detect supported systems from OEM strings
This requires dmidecode 3.1 or later.
SMBIOS tables are not a reliable enough method on all systems.
2017-08-29 16:37:14 -05:00
Mario Limonciello
1790115c93 trivial: dell: don't advertise ---force in an error message 2017-08-29 15:23:00 -05:00
Yehezkel Bernat
f8e5622726 trivial: fix compilation warning
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-29 14:48:45 -05:00
Mario Limonciello
7291c5b3ba trivial: fix TBT controller safe mode handling on Dell
- Set initial (invalid) GUID for TBT controller
- Don't set updatable unless GUID has been refreshed
- Correct the string used for GUID in Dell plugin
2017-08-28 13:24:59 -05:00
Richard Hughes
e0f28539ab trivial: Pedantic error literal conversion 2017-08-26 18:09:21 +01:00
Richard Hughes
91628ff8b6 dell: Use fu_device_has_flag() in the self tests 2017-08-26 18:09:21 +01:00
Richard Hughes
a785a1c2f6 Remove the confusing ALLOW_OFFLINE and ALLOW_ONLINE flags
Over the months the original meaning of ALLOW_OFFLINE and ALLOW_ONLINE have be
lost, and there is now a confusing mixture of uses in the source tree. With this
commit we make it clear the UPDATABLE flag is used to specify when the device is
updatable (e.g. from the desktop live session, or from the systemd offline
updates mode, or both) and the NEEDS_REBOOT flag lets us know when the update
is actually going to be done.

For instance, a UEFI UpdateCapsule can be *scheduled* from either the desktop
or from the update mode (but the latter would be a bit weird), but does require
a reboot. Some devices might only be updatable outside the live session, for
instance a hard drive update or a GPU update -- there's just too much going on
with a live session and we want to tightly control what's running during the
firmware flash.

This also means we don't have to "retry" the update when scheduling an update
that really can be scheduled whenever, but just requires a reboot to apply.
2017-08-26 18:09:21 +01:00
Christian Kellner
1283003f2f thunderbolt: only build tests if glib >= 2.52
This change should restore building fwupd with the new thunderbolt
plugin on older systems.
2017-08-25 16:12:55 +02:00
Richard Hughes
e1a3bdec08 thunderbolt: Add a README file
Fixes: https://github.com/hughsie/fwupd/issues/185
2017-08-25 13:02:47 +01:00
Christian Kellner
e598f75a00 thunderbolt: test we handle change events properly
There was a bug in the plugin that would cause devices to be removed
on change uevents. This test checks for that.
2017-08-25 13:07:53 +02:00
Richard Hughes
6bc5968da2 thunderbolt: Don't remove devices on change events
Based on a patch by Mario Limonciello, many thanks.
2017-08-25 09:50:54 +01:00
Mario Limonciello
3bc251b3a8 thunderbolt: when in safe mode on a Dell system look up VID/DID from SMBIOS
Signed-off-by: Richard Hughes <richard@hughsie.com>
2017-08-25 09:46:41 +01:00
Mario Limonciello
35a0e864b8 Introduce concept of CanForcePower to turn on TBT controllers
Supported Dell devices will use this to turn on ThunderBolt controllers
during coldplug.
2017-08-25 09:35:46 +01:00
Mario Limonciello
bae4b9948d trivial: minor typo that was missed on cherry-pick 2017-08-24 13:48:28 -05:00
Mario Limonciello
a4e764c3e2 Introduce a plugin interaction ABI 2017-08-24 13:41:27 -05:00
Richard Hughes
e1fd34d5f1 Allow plugins to set metadata on devices created by other plugins
This could be used, for instance, to set a property on ThunderBolt controllers
inside Dell computers saying that they support forcing the power level during
coldplug. It could also be used to set the dock type for the synapticsmst hub.

Adding this level of complexity allows us to avoid the creep of HAVE_DELL and
HAVE_LENOVO into seemingly unrelated plugins, and also allows us to have
multiple vendor plugins providing the same end result with two different
vendor-specific mechanisms.
2017-08-24 16:15:11 +01:00
Christian Kellner
1f6873a5dd thunderbolt: add new devices without delay
We want thunderbolt to claim the device and not to race with the
udev plugin.
2017-08-24 13:55:00 +01:00
Mario Limonciello
31f12579ff Add back options for HAVE_SYNAPTICS and HAVE_THUNDERBOLT
These were casualties in the move to meson that caused dell coldplug
prepare to fail.
2017-08-23 13:26:42 -05:00
Richard Hughes
6cbc7a6623 thunderbolt: Increase the runtime timeout for the self tests 2017-08-23 18:34:01 +01:00
Richard Hughes
c788134f75 trivial: Ensure that all the C source files include 'config.h' 2017-08-23 18:26:29 +01:00
Philip Withnall
efcc7a0545 thunderbolt: Drop unnecessary fwup dependency
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-22 10:15:02 +01:00
Christian Kellner
81dd85f6d1 tbtfwu: remove legacy thunderbolt plugin
Replaced by the "thunderbolt" plugin.
2017-08-21 12:12:55 -05:00
Christian Kellner
73ba7ee82c thunderbolt: plugin for new tbt kernel interface
Thunderbolt has a new kernel interface starting from version 4.13,
which simplifies updating the host controller and devices: the
kernel now exposes a sysfs interface for the non-volatile memory
as a device node. This can be used to write the new firmware blob.
Updates are then triggered also via a simple write to a sysfs
file (nvm_authenticate), which in turn is also used for error
reporting.
The plugin should be functionally, but a few items are missing:
 - image verification
 - safe mode handling
2017-08-21 17:05:44 +01:00
Max Ehrlich
e9e23fd342 Remove extra ) from line 227 2017-08-17 16:37:23 -05:00
Philip Withnall
3d626cec07 plugins/amt: Move UUID_LE initialisation into function scope
This should hopefully fix the error:

../../checkout/fwupd/plugins/amt/fu-plugin-amt.c:238:1: error: initializer element is not constant
 uuid_le MEI_IAMTHIF = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d,  \
 ^

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-16 12:53:28 +01:00
Philip Withnall
1f68512f18 Revert "plugins/amt: Fix compilation on Jessie machine; UUID_LE is not const"
This reverts commit 1a5c7f6fe5.

The warning is obviously complaining that the value cannot be evaluated
at compile time, rather than that it’s being assigned to a const storage
location.
2017-08-16 12:53:28 +01:00
Philip Withnall
1a5c7f6fe5 plugins/amt: Fix compilation on Jessie machine; UUID_LE is not const
Unfortunately it seems that the definition of UUID_LE is not const (or
not evaluatable as const by the compiler) on a Debian Jessie machine,
which causes compilation to fail with:

../../checkout/fwupd/plugins/amt/fu-plugin-amt.c:238:1: error: initializer element is not constant
 const uuid_le MEI_IAMTHIF = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d,  \
 ^

Fix that by dropping the const. Sadness.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2017-08-16 07:24:25 +01:00
Philip Withnall
7ca5a04105 plugins/unifying: Fix minor const-correctness issue
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2017-08-16 07:24:25 +01:00
Richard Hughes
94675b458b unifying: Use the new bootloader PIDs for pico receivers
Fixes: https://github.com/hughsie/fwupd/issues/169
2017-08-14 11:14:14 +01:00
Richard Hughes
a8909ec45b trivial: Remove the FuDevice plugin symlinks 2017-08-14 10:29:55 +01:00
Richard Hughes
94f939aa4d trivial: Move the archive decompression to common code 2017-08-09 10:23:23 +01:00
Richard Hughes
d7704d4cc2 Allow plugins to get DMI data from the hardware in a safe way
The returned strings are converted to ASCII and have leading and trailing
spaces removed.
2017-08-09 10:19:13 +01:00
Richard Hughes
e7472a22cc Use a static library to avoid symlinking files for the tests 2017-08-09 10:19:13 +01:00
Chris Lee
f519834bb9 Make flashing ebitdo devices actually work
When my SNES30 controller was in bootloader mode, it wouldn't update,
and when it was in controller mode, it tried and failed. Now, it prints
out the instructions on how to reset the device if it's in controller
mode, and if it's in bootloader mode, it successfully installs the
firmware update from the .DAT file.
2017-08-02 06:43:09 +01:00
Richard Hughes
260e970297 Rename the thunderbolt plugin to tbtfwu 2017-07-30 17:39:25 +01:00
Richard Hughes
70d13a5a58 unifying: Make sure the percentage completion goes from 0% to 100%
Pre-filter the pending LuDeviceBootloaderRequest's after they are parsed so
that we know exactly how many packets need to be sent to the hardware.

As shown in https://github.com/hughsie/fwupd/issues/155, people get worried
if the progress bar finishes before 100% as they'll wonder if all the writing
completed successfully.
2017-07-24 12:02:14 +01:00
Richard Hughes
b31791a11f trivial: Allow setting the unifying bootloader address for self tests 2017-07-24 11:54:31 +01:00
Richard Hughes
da928d1da7 unifying: Fix trivial error handler warning 2017-07-24 11:46:54 +01:00
Richard Hughes
f592b06722 dell: Fix the last of the memory leaks in the self tests
Fixes: https://github.com/hughsie/fwupd/issues/158
2017-07-24 10:55:03 +01:00
Richard Hughes
4bfcae2921 trivial: Fix a tiny leak in the Dell plugin 2017-07-24 10:51:29 +01:00
Mario Limonciello
5f6a574fd7 fix some more memory leaks in dell plugin (#158) 2017-07-21 13:17:47 -05:00
Richard Hughes
3cca1c65c2 trivial: Remove or downgrade some superfluous warnings
Fixes bugs like https://github.com/hughsie/fwupd/issues/159
2017-07-21 13:38:27 +01:00
Richard Hughes
061ad8c5e8 trivial: Make fu_dell_detect_dock() slightly more NULL-deref safe 2017-07-19 09:14:56 +01:00
Mario Limonciello
11ca8122c3 Revert "trivial: fix some more memory leaks in dell plugin (#158)"
This reverts commit 49aba8cd87.

That was prematurely committed, my apologies.
2017-07-18 16:00:03 -05:00
Mario Limonciello
32899e5ff7 dell: use plugin hash table instead 2017-07-18 15:53:38 -05:00
Mario Limonciello
49aba8cd87 trivial: fix some more memory leaks in dell plugin (#158) 2017-07-18 15:53:38 -05:00
Mario Limonciello
d817c53697 Correct a memory leak in Dell plugin (Fixes #158) 2017-07-18 10:35:21 -05:00