Commit Graph

482 Commits

Author SHA1 Message Date
Mario Limonciello
3164784d9e dell: fix crashes when enumerating with dock connected but UEFI capsule off
Crashes will happen when UEFI capsule is turned off due to fwupdate
trying to do a SMI request that invalidates the buffer used by fwupd.

This is due to both fwupdate and fwupd using libsmbios in the same process.
Fixes: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1726367
2017-11-07 09:46:36 -06:00
Richard Hughes
d25e2d543a trivial: Add some self tests that use the Atmel Xplained boards in DFU mode
This does mean the tests have to be run as root to work, but they are just
skipped if run as a user.
2017-11-07 12:40:25 +00:00
Richard Hughes
21852821c5 dfu: Add ChipID quirks for various XMEGA parts
This also adds an *almost* throw-away python script to import the chip-ids from
the default conf file from the avrdude project. I've imported it here in case we
have to start caring about different page sizes or application offsets.
2017-11-07 12:40:25 +00:00
Richard Hughes
8517464eac dfu: Use a 24-byte chip ID for XMEGA parts so we match signature values with dfu-programmer 2017-11-07 12:40:25 +00:00
Richard Hughes
d44a5ee56d dfu: Add support for XMEGA chips
Notably, bootloaders for this class of device export an incorrect DFU interface.

Additionally, allow setting the buffer size for the UPLOAD to a larger size
than the defined device transfer size, which allows us to return the full
packet from the larger XMEGA devices.
2017-11-07 12:40:25 +00:00
Richard Hughes
ac9fa21eda dfu: Use a GError chain to properly report parsing failures 2017-11-07 12:40:25 +00:00
Richard Hughes
bdb6d7027a dfu: Allow setting a specific DFU version for hardware
Ignoring the warning is not good enough when we're setting policy based on the
specific version. Use the new quirk functionality to do this easily, which
also allows us to remove one more thing in the quirk mega-bitfield.
2017-11-07 12:40:25 +00:00
Richard Hughes
387017c331 trivial: Don't show (null) in the UI when the DFU status is unknown 2017-11-07 12:40:25 +00:00
Richard Hughes
a1c09e1b16 dfu: Fix a potential divide by zero issue
If page_sz == 0, which is supported, then we try to take the modulus of it
which is undefined behaviour and can cause a division by zero crash.

Found using Coverity.
2017-11-07 09:41:07 +00:00
Richard Hughes
8a0ec158bd dfu: Return failure when getting device status fails 2017-11-06 20:10:26 +00:00
Richard Hughes
79d08a327b trivial: Use a #define value for signature reads 2017-11-06 12:56:38 +00:00
Richard Hughes
674ed347d2 dfu: Use FuQuirk to map the chip ID to the AVR32 UM0424 alt-name 2017-11-02 19:08:51 +00:00
Richard Hughes
adeefcd4e0 dfu: Use FuQuirk to encode the Jabra magic packet contents
This allows us to remove the Jabra-specific quirk entry in the device bitfield,
and more importantly allows us to support some more Jabra devices in the future
without code changes.
2017-11-02 19:08:51 +00:00
Richard Hughes
6a32b92ef8 dfu: Move some code to allow re-use 2017-11-02 19:08:51 +00:00
Richard Hughes
74a80ccc50 dell: Use the new quirk infrastructure for version numbers 2017-11-02 19:08:51 +00:00
Richard Hughes
24c452297d dfu: Use the FuQuirk infrastructure to move the quirks out of the code
This is slightly more verbose than desired as we also have to include the quirk
information when running the dfu-tool, which does not have an already set-up
FuQuirks object as it has no plugin.
2017-11-02 19:08:51 +00:00
Richard Hughes
78c1e6c009 dfu: Correctly output Intel HEX files with > 16bit offset addresses
Also, fix the checksum to actually produce valid files...
2017-10-31 18:30:05 +00:00
Richard Hughes
6e72343851 dfu: Allow specifying the output file type for 'dfu-tool read'
Guess the file type if it is not explicitly specified.
2017-10-31 18:30:05 +00:00
Richard Hughes
c4e9b08f41 dfu: Remove the CanDownload and CanUpload attribute when required
When the AVR device is not recognised as a supported part we can't read or
write the firmware from the chip.
2017-10-31 18:30:05 +00:00
Richard Hughes
3e1e8227be dfu: Add support for one type of AVR32 device
Currently the only supported model is the AT32UC3A3256S, more to come...
2017-10-31 18:30:05 +00:00
Richard Hughes
d49f64f700 dfu: Split out the STM functionality to a new file 2017-10-31 18:30:05 +00:00
Richard Hughes
fc27df7ceb dfu: Add the ability to dump the raw DFU packets 2017-10-31 18:30:05 +00:00
Richard Hughes
c314b89316 dfu: Add DfuChunked
This allows us to segment a buffer taking into account page borders and maximum
transfer sizes.
2017-10-31 18:30:05 +00:00
Richard Hughes
9acf8cd16f dfu: Set up the DfuTarget when opening the DfuDevice
In the future we'll use this to set vendor-specific quirks.
2017-10-31 18:30:05 +00:00
Richard Hughes
1b577710c5 dfu: Ignore the not-supported error code when opening the DfuDevice
This allows us to fail optional things and still show useful output in:

$ dfu-tool list
2017-10-31 18:30:05 +00:00
Richard Hughes
97520bd583 dfu: Add support for a chip ID
This allows us to show the user something they can include in a bug report.
2017-10-31 18:30:05 +00:00
Richard Hughes
f3e27065e6 dfu: Support devices with truncated DFU interface data
We can assume they support DFU 1.1. Fixes flashing the Jabra Speak 410.
2017-10-30 13:37:11 +00:00
Richard Hughes
54c7c0cc9f dfu: Only detach the HID interface when updating Jabra devices 2017-10-30 13:37:11 +00:00
Richard Hughes
ac32f71a00 trivial: Remove the GObjectClass padding for private objects 2017-10-28 15:18:35 +01:00
Richard Hughes
66513c3b9d dfu: Don't show a debug message when the download timeout is zero 2017-10-26 20:49:10 +01:00
Richard Hughes
181f516114 dfu: Guess the transfer size if it is not specified 2017-10-26 20:49:10 +01:00
Richard Hughes
55d5fb1ab0 dfu: Remove redundant dfu_device_has_dfuse_support() 2017-10-26 20:49:10 +01:00
Richard Hughes
3dd875f975 dfu: Add some utility functions to dfu-common.h 2017-10-26 20:49:10 +01:00
Richard Hughes
3218de03b9 dfu: Add dfu_target_get_sector_default()
This allows us to get the first sector defined for the target.
2017-10-26 20:49:10 +01:00
Richard Hughes
1b1f9d7b6a dfu: Support the IHEX record type 0x05 2017-10-26 08:48:20 +01:00
Kelly Anderson
c015642803 fix mispelled redesign 2017-10-19 22:35:17 -05:00
Mario Limonciello
fecfe3b8db thunderbolt: move test for mock environment (Closes #280)
umockdev 0.9.4 changed how to test for running in mock and this
causes the assumptions on mock testing at init to fail.

Move the test for this to after the environment has been set up.
2017-10-19 08:40:08 -05:00
Mario Limonciello
bd0f3f8920 rename fu-dell-common to fu-dell-smi
Since it's not being used by other plugins, make it represent
what it really does now.
2017-10-18 08:27:54 -05:00
Mario Limonciello
7af941fee4 synaptics: drop hard dependency on dell plugin and libsmbios
Rather than have a hard dependency use metadata and internal DMI
to communicate the relevant details
2017-10-18 08:27:38 -05:00
Mario Limonciello
ed538c2b84 drop fu_dell_get_cable_type, unused 2017-10-18 08:22:43 -05:00
Richard Hughes
37ca220f9b dfu: Set the vendor ID to the runtime USB VID 2017-10-14 10:22:23 +01:00
Richard Hughes
61222fcb60 dfu: Add the various device quirks for the Jabra Speak devices
With much help from Niels Skou Olsen <nolsen@jabra.com>, many thanks.
2017-10-13 17:24:35 +01:00
Richard Hughes
3d2baa7476 dfu: Add DFU_DEVICE_QUIRK_ATTACH_EXTRA_RESET
Some devices need yet another reset to get them back into runtime mode.
2017-10-13 17:20:20 +01:00
Richard Hughes
7a42f5eab9 dfu: Add DFU_DEVICE_QUIRK_IGNORE_UPLOAD
Some DFU implementations (e.g. CSR) do not properly support verification of
firmware using the upload mechanism.
2017-10-13 17:20:20 +01:00
Richard Hughes
c995a0218e dfu: Use the correct wDetachTimeOut when writing firmware
Although it makes things faster to ignore the timeout, it violates the DFU
specification which could break some devices.

Lets err on the side of caution for now, even if this means slowing down an
uncommon operation.

This reverts commit 144473c1f4.
2017-10-13 17:20:20 +01:00
Richard Hughes
ce7baf4e2e dfu: Don't infer that NO_DFU_RUNTIME always requires user action 2017-10-13 17:20:20 +01:00
Richard Hughes
9fac3a2895 dfu: Unbind the kernel module when claiming the device DFU interface 2017-10-13 17:20:20 +01:00
Richard Hughes
5bb91535ce Format the BCD USB revision numbers correctly
Add lots of code because it's not cool to hard depend on appstream-glib master.
2017-10-13 10:03:06 +01:00
Richard Hughes
8232d250a2 dfu: Do not try to verify the element write if upload is unsupported 2017-10-13 09:14:10 +01:00
Richard Hughes
64179e42af dfu: Print the device attributes when using 'dfu-tool list' 2017-10-13 09:13:42 +01:00
Richard Hughes
60aa497e6b 8bitdo: Verify legacy VIDs are actually 8Bitdo controllers
8Bitdo devices with firmware <= 4.0.0 used a few different USB VIDs, some of
which being shared with other projects. For the older firmware, compare the
vendor against a whitelist to ensure we only try to update 8Bitdo game pads.

Fixes https://github.com/hughsie/fwupd/issues/275
2017-10-12 14:15:41 +01:00
Richard Hughes
144473c1f4 dfu: Do not use wDetachTimeOut when in DNLOAD_IDLE
This speeds up the DFU plugin to the same speed as using dfu-util.
2017-10-12 12:47:36 +01:00
Richard Hughes
4b9126ee7d dfu: Allow flashing when the target does not specify an alt-name 2017-10-12 12:47:10 +01:00
Richard Hughes
1690ef2a83 trivial: Set the appropriate status when waiting for tbt hardware 2017-10-12 12:43:47 +01:00
Richard Hughes
f50eca4f55 trivial: Add FWUPD_STATUS_DEVICE_BUSY
This is when we're waiting for the device, but we don't know why.
2017-10-12 12:43:25 +01:00
Richard Hughes
b9f4907645 dfu: Add a low-level 'reset' command to dfu-tool 2017-10-12 09:13:27 +01:00
Richard Hughes
6359f7f9c6 dfu: Log the transfer size chosen for the device 2017-10-12 09:13:27 +01:00
Richard Hughes
153374e014 dfu: Use 0x0101 as an alias for 0x0110
If read the specification correctly it's supposed to be 0x0110 i.e. 1.10,
rather than 1.01 -- just work around it as it seems a common enough mistake.
2017-10-12 09:13:27 +01:00
Richard Hughes
a1c7716cdc dfu: Fix uploading large firmware files
Fixes split into more than 0xff chunks were being truncated as uint8_t was the
wrong index type.
2017-10-12 09:13:27 +01:00
Richard Hughes
8e054956b2 dfu: Include the reset timeout as wValue to fix some hardware 2017-10-12 09:13:27 +01:00
Richard Hughes
4212f40e9d trivial: Fix failure to build on i386 2017-10-09 12:17:02 +01:00
Richard Hughes
cd0d72abbe trivial: Move the man pages to the source locations
This should make it easier to keep them in sync.
2017-10-09 09:59:52 +01:00
Richard Hughes
9d30c5a4ee trivial: Fix a Werror=sign-compare on Fedora 28 2017-10-07 11:11:25 +01:00
Mario Limonciello
26767845f1 trivial: dell: add missing icon for TPM devices 2017-09-28 10:25:30 -04:00
Richard Hughes
eb53042c20 trivial: Use FuProgressbar in dfu-tool 2017-09-28 09:23:52 +01:00
Richard Hughes
b73ff8a346 trivial: Use FwupdStatus in the dfu plugin 2017-09-28 09:23:52 +01:00
Richard Hughes
9e79223ecf trivial: C99ify more for-loops 2017-09-28 09:23:52 +01:00
Richard Hughes
5cc168fa79 uefi: Do not use system-specific infomation for PCI devices
We should not use system quirks for version formatting or use the SMBIOS name
as a prefix for non-integral devices.
2017-09-26 19:50:37 +01:00
Richard Hughes
2fac59f64a trivial: Refactor the UEFI resource coldplug into a new helper
No functional changes.
2017-09-26 19:50:37 +01:00
Richard Hughes
9b4a66c8f8 uefi: Support uploading the firmware splash image 2017-09-26 19:50:37 +01:00
Richard Hughes
d8790e19a9 trivial: Factor out the call to fwup_set_up_update_with_buf() for future use 2017-09-26 19:50:37 +01:00
Mario Limonciello
5a8e8ee88d dell: only set coldplug delay when we know we need it
It's not very common to have a system with a Synaptics MST hub or
a dock plugged in.  Avoid slowing down fwupd enumeration in the
common scenario.
2017-09-26 08:56:07 -04:00
Mario Limonciello
e401edd107 dell: only run SMI to toggle host MST GPIO on systems with host MST
As type-C docks become more common MST controllers in the host are
going to become rarer.  This should be a manageable whitelist
and prevent running the SMI on the majority of systems.
2017-09-26 08:56:07 -04:00
Mario Limonciello
5a3ff3a446 trivial: dell create a function for looking up system ID
Enough places look for it that code duplication should go away.
2017-09-26 08:56:07 -04:00
Mario Limonciello
48cae2cb5e dell: add functionality to blacklist HW with problems
This is certainly a problem lower in the stack, but at least provide
a method to block these systems from bringing down fwupd until it's
fixed.
2017-09-26 08:56:07 -04:00
Mario Limonciello
e0e6a0b885 dell: only run on intended chassis
For example if trying to run on a server, they might support some
dell SMI but are architected differently.
2017-09-26 08:56:07 -04:00
Mario Limonciello
48a164657e thunderbolt-power: always run after thunderbolt plugin
It's important to make sure that coldplug finished on thunderbolt
as this is what thunderbolt-power uses to make intelligent decisions
2017-09-22 05:51:20 +08:00
Richard Hughes
08a37992f9 Allow plugins to depend on each other
The only things that plugins can declare is that they should be run before,
after or never with regard to another plugin.
2017-09-21 17:09:06 +01:00
Mario Limonciello
39c4436c3d trivial: dell: move fu_dell_supported into plugin
Eventually fu-dell-common will not be used by synaptics, and it's
already not using this function.
2017-09-21 06:23:24 +08:00
Mario Limonciello
1edb50ed2f trivial: dell: remove needless includes 2017-09-20 09:11:02 -05:00
Mario Limonciello
9a30ef284d dell: prefer to use hwids to get DMI keys and DE table
libsmbios is still used as a fallback in some cases, mostly
because it's not clear whether or not ProductSKU is available
in all instances.
2017-09-20 09:11:02 -05:00
Richard Hughes
34e25a0cc5 trivial: Remove EnableTestSuite from daemon.conf
The same thing can be done using BlacklistPlugins=test
2017-09-19 20:06:44 +01:00
Richard Hughes
1df45c1401 unifying: Use fu_plugin_check_supported()
Some (HIDPPv1?) devices don't like being probed, and in some cases actually
stop working altogether.

Fixes bugs like #127 and #258
2017-09-19 16:11:27 +01:00
Richard Hughes
86a500462a Revert "unifying: Use a device whitelist to avoid breaking devices"
This reverts commit f194d68570.
2017-09-19 16:00:45 +01:00
Mario Limonciello
9ff5670b3d drop fu-dell-tool
It's been superceded by the thunderbolt power plugin
2017-09-18 17:13:12 -05:00
Richard Hughes
f194d68570 unifying: Use a device whitelist to avoid breaking devices
Some (HIDPPv1?) devices don't like being probed, and in some cases actually
stop working altogether. As we only really support the K780, just whitelist
that and another test device.

Fixes bugs like #127 and #258
2017-09-18 17:36:48 +01:00
Richard Hughes
daa341720f trivial: Show the interface size for an invalid DFU device 2017-09-18 11:06:29 +01:00
Richard Hughes
9decf17d82 dell: Fix a trivial whitespace issue 2017-09-16 18:52:44 +01:00
Richard Hughes
c8d028207f uefi: Do not set the release version
Instead, put the failing version number in the error message where it belongs.
2017-09-13 14:05:50 +01:00
Richard Hughes
0de86eca3d udev: Do not match USB devices, even with a GUID set
Prevents a warning about PRODUCT not existing when the usb plugin is disabled.
2017-09-13 14:05:46 +01:00
Mario Limonciello
8f17e1ccf4 Use the intel-wmi-thunderbolt kernel module to force power
When available on a system this module will allow force powering a TBT device with nothing plugged in.
2017-09-13 03:12:50 +08:00
Mario Limonciello
9d84b22d7b dell: drop thunderbolt force power code
This is replaced by the WMI force power interface.
2017-09-13 03:12:50 +08:00
Richard Hughes
f966e3f2a4 unifying: Add hardcoded summaries for peripheral kinds 2017-09-12 16:40:40 +01:00
Richard Hughes
5e3c19092f trivial: Do not print (null) for the new Unifying feature index 2017-09-12 16:36:19 +01:00
Richard Hughes
499d9f39a5 Fix a GObject registration problem on Debian
Do not link the static library with libfwupdprivate, instead do it in the
target executable.

Fixes https://github.com/hughsie/fwupd/issues/244
2017-09-12 09:34:51 +01:00
Richard Hughes
c1c2fec6f5 Add optional icons to each device
This allows us to show the devices in a GUI with a nice icon. Some of the icon
mappings are not perfect and I'll be asking the GNOME designers for some
additions to the icon specification.

Custom vendor icons can also be specified, and /usr/share/fwupd/icons would be
a good place to put them. If vendor icons are used they should show a physical
device with the branding, rather than just the vendor logo.
2017-09-11 17:27:35 +01:00
Richard Hughes
9bfcfd88cf Ensure more devices set the device summary
This helps users identify what the device actually does.
2017-09-11 15:10:50 +01:00
Richard Hughes
58546b3b00 trivial: Set a vendor ID for the ColorHug devices
This ensures that only firmware uploaded with this vendor ID can be flashed to
the hardware. This stops vendors on the LVFS from accidentally updating devices
from other vendors on the LVFS.
2017-09-11 10:31:56 +01:00
Richard Hughes
5720fc9d90 trivial: Add more vendor information to devices 2017-09-11 10:11:34 +01:00
Richard Hughes
e4be834ac1 unifying: Disable if the kernel has no CONFIG_HIDRAW support
Fixes: https://github.com/hughsie/fwupd/issues/235
2017-09-08 13:47:52 +01:00
Richard Hughes
b3c13461e9 trivial: Use the error domain from libfwupd
This means we don't need to convert the error code in the dfu plugin.
2017-09-08 13:33:34 +01:00
Richard Hughes
ef39e2e52f trivial: Remove all the DFU API versioning information 2017-09-08 10:32:22 +01:00
Mario Limonciello
705fd1600b trivial: remove unused variable in unifying (Fixes: #229) 2017-09-07 21:54:44 +01:00
Richard Hughes
a81ee67356 dfu: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
68e6065f0d unifying: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
7ca38ce446 colorhug: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
4edeeda345 ebitdo: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
e3e7a7b7d1 altos: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
5b4d7dce0a steelseries: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
92faae9a41 usb: Use FuDeviceLocker 2017-09-07 19:00:51 +01:00
Richard Hughes
0f224225f7 dfu: Remove DEVO support
The hardware does not support the DFU specification enough for a metadata table
to be embedded, so there's no way to reliably detect the 'devo' cipher, thus
making the support useless.
2017-09-07 18:39:23 +01:00
Richard Hughes
fd931a962f dfu: Remove the now-unused symtab support 2017-09-07 18:39:23 +01:00
Richard Hughes
68480a2069 trivial: Move the libdfu sources to the dfu plugin 2017-09-07 18:39:23 +01:00
Richard Hughes
53237d26a1 Remove the ELF support from libdfu and move the code to the altos plugin
This was a mistake originally for two reasons:

 * The only device to use ELF as a deliverable is the altos devices
 * ELF has nothing to do with the DFU specification

This moves the code to where it belongs.
2017-09-07 18:39:23 +01:00
Richard Hughes
7ac92109eb trivial: Remove useless config.h defines
The HAVE_UEFI_UNLOCK and HAVE_UEFI_GUID defines are always present for the
libfwup version we require.
2017-09-06 23:07:50 +01:00
Richard Hughes
54237e276d trivial: Use upstreamed libfwup functions added in 0.5 2017-09-06 23:07:50 +01:00
Richard Hughes
5075fa9c5b trivial: Remove some defines added in 0.3
For reference, we depend on at least 0.5...
2017-09-06 23:07:50 +01:00
Richard Hughes
1b090802f3 usb: Disable the fallback USB plugin
It's not super useful. If this has no bad effects for a couple of releases we
can either remove it completely or move the functionality to the test plugin.
2017-09-05 18:08:29 +01:00
Richard Hughes
4f0c828ca6 Fix build with newer versions of libgudev
Newer versions include the g_autoptr() macros in the installed headers.
2017-09-01 14:53:14 +01:00
Mario Limonciello
bb9d3b14dd Revert "dell: prefer to detect supported systems from OEM strings"
This reverts commit 257c14ebd1.

Although this is the preferable way to detect Dell systems this was
leading to executing SMI on some systems with problems.
libsmbios has some memory issues that need to be fixed first.
2017-08-31 16:48:45 -05:00
Yehezkel Bernat
ced27e8cbc thunderbolt: add description to all FwLocation objects
Completing what discussed in https://github.com/hughsie/fwupd/pull/214

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-31 13:11:52 -05:00
Mario Limonciello
a65ce8392b trivial: use fu_device_has_flag instead of fwupd_device_has_flag 2017-08-31 13:11:27 -05:00
Mario Limonciello
d63e7317db trivial: dell: turn device back on for thunderbolt plugin, not tbtfwu plugin 2017-08-31 13:00:32 -05:00
Mario Limonciello
c2ed0cb2bc trivial: update remaining use of ALLOW_ONLINE to UPDATABLE 2017-08-31 12:59:26 -05:00
Richard Hughes
d55d4f6de1 thunderbolt: All C source files need to include config.h 2017-08-31 14:40:25 +01:00
Christian Kellner
2be0c71b2c thunderbolt: validation: don't print empty strings
Before: "Given location is outside of the given FW ((null))"
2017-08-31 13:46:24 +01:00
Christian Kellner
44879b0252 thunderbolt: test image validation
Add a test case to test the new image validation code.
2017-08-31 13:46:24 +01:00
Richard Hughes
b5754f30cb thunderbolt: Fix a Coverity false-positive in the self tests 2017-08-30 15:06:06 +01:00
Richard Hughes
e655008a73 trivial: Fix starting conditions in the self tests
Found using Coverity.
2017-08-30 15:06:06 +01:00
Yehezkel Bernat
a23551e352 thunderbolt: refer to the wiki on image validation failure
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 14:01:26 +01:00
Yehezkel Bernat
e6c00362ad thunderbolt: image validation implemented
Fixes: https://github.com/hughsie/fwupd/issues/189

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 12:37:34 +01:00
Richard Hughes
b95b75a211 trivial: Remove unused function in the dell plugin
Fixes: https://github.com/hughsie/fwupd/issues/209
2017-08-30 10:54:29 +01:00
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