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
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
Mario Limonciello
c29b398ad0
trivial: fix various spelling errors
2017-07-17 13:07:05 -05:00
Mario Limonciello
e68b118044
uefi: test for kernel support during coldplug
...
The kernel offers two interfaces for manipulation of EFI variables.
Make sure that at least one of these is available.
If another interface is added (and supported by efivar) then this
list will need to be appended as well.
This was raised as a potential problem in #100 .
2017-07-10 14:11:22 -05:00
Mario Limonciello
c7e5322454
dell, uefi: Display all errors recorded by efi_error tracing, not just the first one
2017-07-10 14:11:10 -05:00
Richard Hughes
c633edc773
unifying: Don't log a warning when an unknown report is parsed
...
Fixes: https://github.com/hughsie/fwupd/issues/151
2017-07-07 13:42:45 +01:00
Mario Limonciello
8cb067d528
trivial: uefi: whitespace
2017-07-06 12:39:33 -05:00
Mario Limonciello
f043f1f94b
uefi: record boot variables to system log during updates ( #152 )
...
This doesn't strictly resolve the encountered issue, but
it will aide in debugging these types of issues in the future.
2017-07-06 12:37:10 -05:00
Richard Hughes
79acb58c7e
uefi: Fix crash when the product name is NULL
...
...bad things happen when you try to free a const char...
2017-07-06 18:27:01 +01:00
Mario Limonciello
c1a4bd469d
uefi,dell: make error messages from installing capsules useful
...
Before:
$ fwupdmgr install XPS_test.cab
Retrying as an offline update...
Scheduling… UEFI firmware update failed: -1
After:
$ fwupdmgr install XPS_test.cab
Retrying as an offline update...
Scheduling… UEFI firmware update failed: libfwup.c:733 get_paths(): could not find shim or fwup on ESP: No such file or directory
2017-07-06 11:38:33 -05:00
Mario Limonciello
be3a994922
Display UEFI firmware type
...
This will be more important as devices include more than
one entry in the ESRT.
2017-07-05 17:16:18 -05:00
Richard Hughes
822e134e94
unifying: Split up the HID++2.0 and HID++1.0 functionality
2017-07-04 13:19:09 +01:00
Richard Hughes
2a247e85e3
unifying: Allow flashing in bootloader modes
2017-07-03 20:17:50 +01:00
Richard Hughes
07bdf87b86
trivial: Add defines for the 'very-long' register read/write
2017-07-03 20:17:43 +01:00
Richard Hughes
b1af7496b1
unifying: Show the hardware version when the hardware provides this
2017-06-28 14:19:11 +01:00
Richard Hughes
55e6d9a74f
unifying: Only add the feature Root on HID++2.0 devices
2017-06-28 14:18:56 +01:00
Richard Hughes
42b6439892
unifying: Switch to a floating point HID++ version
2017-06-28 14:17:30 +01:00
Richard Hughes
2c1bd0236c
unifying: Only call HID++2.0 features on version 2+ devices
...
Also, ignore HID++1.0 replies from HID++2.0 devices and use the correct
function ID for getDfuStatus to avoid an error.
2017-06-28 12:10:02 +01:00
Richard Hughes
e97c5eb013
unifying: Manually set the HID++ version for runtime devices
2017-06-28 12:09:51 +01:00
Richard Hughes
653119fef8
unifying: Use a longer timeout for some operations
2017-06-28 12:09:51 +01:00
Richard Hughes
22dc937184
unifying: Use __attribute__((packed)) for structs sent to the hardware
2017-06-28 12:09:51 +01:00
Richard Hughes
f21cda4fed
unifying: Clear the feature map when a device is reprobed
2017-06-28 12:09:51 +01:00
Richard Hughes
695d01ed93
unifying: Keep the devices open, closing in finalize
2017-06-28 12:09:51 +01:00
Richard Hughes
c3b5b24287
unifying: Fix a confusing debug message
2017-06-28 12:05:32 +01:00
Richard Hughes
ae15bc2649
unifying: Filter by SwId when making HID++2.0 requests
...
Using the default value of '0' is what the kernel is using (related, libratbag
is using 0x08) and makes hotplug unreliable.
2017-06-28 12:05:32 +01:00
Richard Hughes
668f91419d
unifying: Allow large HID++ version numbers
...
Apparently, '4.3' is a perfectly valid version number.
2017-06-28 12:05:32 +01:00
Richard Hughes
f1399580b5
unifying: Do not allow closing a non-open device
2017-06-28 12:05:32 +01:00
Richard Hughes
38451999ff
unifying: Actually enforce the device_id checks
2017-06-28 12:05:32 +01:00
Richard Hughes
8884676c5d
unifying: Ping before trying to get the feature indexes
...
This reduces log spew for disconnected-but-paired devices.
2017-06-28 12:05:32 +01:00
Richard Hughes
45e3a03d15
trivial: Make a debug message less alarming
2017-06-28 12:05:32 +01:00
Richard Hughes
72975f0077
unifying: Only mark the device as active once the probe has completed
2017-06-24 07:40:38 +01:00
Richard Hughes
765c679498
unifying: Only detach the device if required
2017-06-24 07:24:15 +01:00
Richard Hughes
ed34991bd8
Do not unlock devices when doing VerifyUpdate
...
We used to do this dance to avoid reading the Option ROM on hardware by default
(some faulty hardware would crash...) but now we're doing the verify update in
the daemon there's no need to split this into two steps.
Fixes: https://github.com/hughsie/fwupd/issues/149
2017-06-22 10:37:10 +01:00
Richard Hughes
3045d1ca3f
unifying: Do not poll when we're waiting for device replug
...
If we happen to poll when the device is in the *process* of closing then the
open() fails in a weird way. If we're flashing it's probably a good idea to not
be too clever anyway...
2017-06-22 09:38:10 +01:00
Richard Hughes
7048044156
trivial: Fix up an error message in the unifying code
2017-06-22 09:38:10 +01:00
Richard Hughes
a42dae927c
unifying: Wait for device to re-appear in runtime after attaching
...
This ensures we can flash multiple versions of firmware without an artificial
delay. Also raise the timeout to cope with chains of slow hubs.
2017-06-22 09:37:48 +01:00
Richard Hughes
97fd762b47
unifying: Never allow the USB plugin to claim devices
2017-06-22 09:36:32 +01:00
Richard Hughes
0be13c038a
unifying: Allow a response from CMD_REBOOT
...
It's a race afterall, so some hardware is faster than others...
2017-06-22 09:36:32 +01:00
Mario Limonciello
f3f4390155
Only use the test runner plugin when CI is set in the env ( #148 )
...
This prevents an installed system from showing FakeDevices but
still allows exercising every commit with Travis CI
2017-06-20 13:56:13 -05:00
Richard Hughes
166d42cada
amt: Fix up a small memory leak and remove some goto's
2017-06-19 20:19:32 +01:00
Richard Hughes
9b59676a24
Add a plugin to get the version of the AMT ME interface
2017-06-19 14:01:47 +01:00
Richard Hughes
b53ad36012
trivial: Fix up a number of FALSE/NULL return issues
2017-06-19 13:50:42 +01:00
Richard Hughes
4a2e915e9a
unifying: Use the UFY DeviceID prefix as the PID is not 'USB PIDs' at all.
...
Resolves: https://github.com/hughsie/fwupd/issues/144
2017-06-16 16:45:42 +01:00
Richard Hughes
bbde1df44f
Fix downgrades when version_lowest is set
...
Also, add some tests to test this with the dummy device.
2017-06-16 12:40:15 +01:00
Richard Hughes
b7bf715435
Add an installed test for device update
...
This also moves the tests into one file as gnome-desktop-testing-runner
intentionally randomizes the order and runs them in parallel where allowed.
Since tests like get-updates have to be run after the metadata injection simply
put these into one test that calls a simple script.
2017-06-15 20:19:03 +01:00
Richard Hughes
ae7e0d21b2
Add an installed test for verification
2017-06-15 16:23:52 +01:00
Richard Hughes
fd381cc96e
Add the ability to restrict the firmware installation to specific vendor IDs
...
This allows us to fix https://github.com/hughsie/lvfs-website/issues/4
2017-06-12 20:22:25 +01:00
Richard Hughes
e76ed8eb0d
trivial: Generate more than just SHA1 OptionROM checksums
2017-06-07 08:02:41 +01:00
Richard Hughes
68cc00c7e9
Allow multiple checksums on devices and releases
...
Although we supported other hashes than SHA1 (which is now moderately unsafe)
we had to switch the metadata provider and daemon on some kind of flag day to
using SHA256. Since that's somewhat impractical, just allow multiple checksums
to be set on objects and just try to match whatever is given in preference
order.
This also means we can easily transition to other hash types in the future.
The removed API was never present in a tarball release, so not an API break.
2017-06-06 20:06:53 +01:00
Richard Hughes
0fe22ff010
ebitdo: Ensure the version is set on the device in non-bootloader mode
2017-06-05 09:03:44 +01:00
Richard Hughes
a9adbf5d22
ebitdo: 8bitdo has started using a new VID
2017-06-05 08:46:50 +01:00
Richard Hughes
35579c3183
unifying: Do not expect a reply when issuing a REBOOT command
...
Although the device does send a response, in some cases the Linux USB stack
processes the disconnect before the reply is processed.
Resolves: https://github.com/hughsie/fwupd/issues/122
2017-05-31 16:44:21 +01:00
Richard Hughes
5bba7caa4d
unifying: Remove the indirection to lu_device_send_request()
...
It's only called by one static user, and it is much simpler this way.
2017-05-31 16:40:54 +01:00
Richard Hughes
2ff985e04b
unifying: Allow calling lu_device_close() multiple times without an error
2017-05-31 16:36:00 +01:00
Richard Hughes
e1e9fa99b4
unifying: Don't read a register we don't use
...
It seems other firmware versions are affected too.
2017-05-30 19:46:42 +01:00
Mario Limonciello
df1f570069
Fix a logic error with testing for a dell system.
...
Some Lenovo systems were inadvertently matching.
2017-05-25 21:33:54 -05:00
Richard Hughes
e2ecefa3c3
unifying: Relax the requirement that a SHORT request should return a SHORT reply
...
For some HID++2.0 devices a SHORT request is allowed to be padded into a LONG
response.
2017-05-23 13:54:10 +01:00
Richard Hughes
2b5f6b9a74
unifying: Correctly open RQR12 devices with original factory firmware
...
It seems reading from the register is fixed in later firmware versions.
2017-05-23 13:14:28 +01:00
Richard Hughes
fd45583728
unifying: Ensure HID devices are closed if the subclassed open() or probe() failed
...
Fixes the critical warnings in https://github.com/hughsie/fwupd/issues/117
2017-05-23 12:27:23 +01:00
Richard Hughes
26a52be318
unifying: Fix the spelling of 'Receiver'
2017-05-23 09:30:20 +01:00
Richard Hughes
ccda0d2be7
uefi: Add a translatable string for future use
...
This is added now so the translator teams get a chance to translate it before
it is used in anger.
2017-05-22 12:01:26 +01:00
Richard Hughes
0293f720bc
unifying: Ensure device is closed if fu_device_ebitdo_open() did not complete
...
It's not expected users have to call lu_device_close() if opening failed.
2017-05-08 12:44:53 +01:00
Richard Hughes
741f3310ab
ebitdo: Ensure device is closed if fu_device_ebitdo_open() did not complete
...
It's not expected users have to call fu_device_ebitdo_close() if opening failed.
2017-05-08 12:44:26 +01:00
Richard Hughes
b0c65749fc
steelseries: Ensure device is closed if it returns an invalid packet
2017-05-08 12:43:17 +01:00
Richard Hughes
2bdc588112
unifying: Ignore spaces in the version prefix
2017-05-03 10:24:59 +01:00
Richard Hughes
7a7591a99a
unifying: Add support for DFU features
...
This adds support for flashing peripherals with the 0x00d0 DFU feature.
2017-05-02 21:30:50 +01:00
JulianLiu
1d577d6572
enable-dell requires libfwup-dev ( #113 )
...
* enable-dell requires libfwup-dev
Add dependency in enable-dell and shared_module('fu_plugin_uefi')
2017-05-02 19:38:15 +01:00
Mario Limonciello
5c1df14d05
fix test suite localstate directory to be a temporary directory
2017-04-20 13:53:19 -05:00
Richard Hughes
fe3f0eda75
trivial: Fix build when using older version of meson
...
Newer meson versions ignore unknown found requests, not so much for older ones.
2017-04-19 08:38:41 +01:00
Richard Hughes
4f0f4c77ce
trivial: Fix underlinking in the altos plugin
2017-04-16 09:10:30 +01:00
Richard Hughes
1fdb335025
Remove the automake build system
2017-04-13 18:42:08 +01:00
Richard Hughes
f6ee41edf2
trivial: Make libtbtfwu optional when compiling with thunderbolt support
2017-04-13 17:44:08 +01:00
Richard Hughes
9f0c47b36a
Fix the raspberrypi self test code under meson
...
Also, refactor the common test code to a new source file.
2017-04-13 10:09:33 +01:00
Richard Hughes
87e82a716d
trivial: Add the optional valgrind functionality back
2017-04-12 18:21:08 +01:00
Richard Hughes
67b8cb62bc
trivial: Fix the last -Wpointer-sign warning
2017-04-12 17:56:54 +01:00
Richard Hughes
ea8ebcfc7b
unifying: Refactor the plugin now we have some more information about the hardware
...
Many thanks to Logitech.
2017-04-12 17:54:50 +01:00
Richard Hughes
38a08807f5
trivial: Fix linking in the synapticsmst plugin
2017-04-12 17:54:46 +01:00
Richard Hughes
463f80566c
trivial: Fix linking in the thunderbolt plugin
2017-04-12 17:54:46 +01:00
Richard Hughes
57746cb839
Add the Meson build system as an alternate to autotools
...
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.
See http://mesonbuild.com/ for more information.
2017-04-12 16:35:18 +01:00
Richard Hughes
d3f4b5a428
trivial: Define the build dir outside the source file
2017-04-12 14:26:14 +01:00
Richard Hughes
f985a8f7b7
trivial: Fix the log domains in two plugins
2017-04-12 14:20:07 +01:00
Mario Limonciello
99489a8638
trivial: set synaptics error message in more scenarios
2017-03-20 13:34:26 -05:00
Richard Hughes
7db8ed498b
trivial: Unbreak make check
2017-02-24 10:55:46 +00:00
Richard Hughes
c3c28bacae
trivial: Always initialize a g_autoptr as the compiler is not yet smart enough
2017-02-24 07:54:51 +00:00
Mario Limonciello
6cabd969e9
trivial: correct a small memory leak in SynapticsMST plugin
2017-02-23 13:16:04 -06:00
Mario Limonciello
e70e5513ca
dell: don't initialize libsmbios on unsupported systems
...
As found in https://github.com/dell/libsmbios/pull/13
there are some errors with libsmbios error paths.
These need to be fixed in libsmbios, but at least avoid
running this code on those systems (and crashing fwupd).
2017-02-20 14:54:12 -06:00
Mario Limonciello
aad9729347
trivial: fix build issues with older efivar
...
This is in the same vane as 4da67515
, it allows linking with
an older efivar.
2017-02-15 09:29:59 -06:00
Richard Hughes
d82a6024e7
Fix a crash when enumerating devices on a Dell WLD15
2017-02-13 11:03:03 +00:00
Richard Hughes
31c36cd2b6
trivial: Fix some -Wdiscarded-qualifiers warnings
2017-02-13 11:02:19 +00:00
Richard Hughes
2613dcc3b8
trivial: Fix another -Wpointer-sign compile warning
2017-02-13 10:50:07 +00:00
Richard Hughes
6d5f2dc25e
trivial: Fix compile warnings when building packages
2017-02-13 10:50:07 +00:00
Richard Hughes
4da6751502
trivial: Fix build issue
...
Patch from Gert Hulselmans, many thanks.
Fixes: https://github.com/hughsie/fwupd/issues/88
2017-02-13 10:50:07 +00:00
Kai Krakow
1c7ea9ee2d
Fix compiler warnings
...
My compiler doesn't understand -Wno-discard-qualifiers so drop it and
fix the warnings instead. I think it is better to explicitly fix them
anyways instead of just to ignore the discarded const qualifier in
general.
I think the option should be avoided in hand-written code. The warning
is there for a reason: To protect you from possibly overwriting data you
expect to not be modified when passing pointers around.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41215
2017-02-13 10:02:25 +00:00
Richard Hughes
3e214856fb
trivial: Fix a resource leak spotted by coverity
2017-02-08 11:03:48 +00:00
Mario Limonciello
8971645f78
trivial: synapticsmst: don't bother to scan cascade nodes in test suite
...
This significantly speeds up the test suite.
They can't really be easily represented anyways in the test suite
since the devnode would have to change so much between steps.
2017-02-03 13:21:29 -06:00
Richard Hughes
48d23f7bb0
Fix a refcounting issue in the udev plugin
...
Objects are returned from the cache with transfer:none.
Hopefully fixes https://github.com/hughsie/fwupd/issues/86
2017-02-03 14:17:07 +00:00
Richard Hughes
c4cbcafe5e
synapticsmst: Fix up some trivial whitespace issues
2017-02-03 10:11:41 +00:00
Mario Limonciello
0a65ffb239
synapticsmst: add a test suite
2017-02-02 21:43:42 -06:00
Mario Limonciello
f5144d0720
trivial: synaptics: increase flash mode delay to 3s
...
This allows devices with multiple hubs to settle between device
flashes better. It doesn't have much other functional impact.
2017-02-01 17:16:27 -06:00
Mario Limonciello
e41e4a7a26
trivial: synaptics: encode chip ID into dock string
...
Although the same payload is used for all 3 MST hubs in TB16 or WD15
it's possible this may change one day. Create separate GUID's for
all 3 different combinations by encoding the chip ID into the GUID
string.
2017-02-01 16:43:57 -06:00
Mario Limonciello
43f2286e10
trivial: synaptics: update the device name to be more sensible
2017-02-01 16:43:50 -06:00
Mario Limonciello
8d97bcf0ed
trivial: synaptics: keep system ID in hexadecimal
2017-02-01 14:04:44 -06:00
Mario Limonciello
66d383cfed
trivial: synaptics: check for removed cascaded devices during scan
2017-02-01 13:53:34 -06:00
Mario Limonciello
9e868a2cf8
trivial: synaptics: make debug messages more useful
2017-02-01 13:33:43 -06:00
Mario Limonciello
8d51d273e7
trivial: synapticsmst: consistently use lower case for dock ID's
2017-02-01 13:25:54 -06:00
Mario Limonciello
ccee8cd86f
trivial: synaptics: remove cascaded devices if the direct device falls off
2017-01-31 11:02:54 -06:00
Mario Limonciello
7319259a84
Add a new function fu_dell_supported to fu-dell-common
...
This is used by Dell, Synaptics and Thunderbolt plugins
to identify if the system is a Dell system and if so
activate special code paths.
2017-01-30 20:58:28 -06:00
Mario Limonciello
8e74df7528
synapticsmst: build GUID using dock type
...
Although WD15 and TB16 share a same payload today, this may not
be the case some day in the future. Use the fu-dell-common method
to determine the dock in use to build the GUID.
2017-01-30 20:37:48 -06:00
Mario Limonciello
bae3a02348
trivial: dell: move some dock lookup code into -common
...
This allows other plugins to compile in -common to be able look
up some dock related items.
2017-01-30 20:17:48 -06:00
Mario Limonciello
694bb60f2c
trivial: dell: update readme for MST and TBT being part of fwupd
2017-01-30 20:00:23 -06:00
Mario Limonciello
0800097d25
trivial: dell: rework dell plugin to track a single smi object
...
Tracking a single smi object in the plugindata is more similar
to how other plugins operate and also allows moving FuPluginData
out of fu-dell-common, making fu-dell-tool less hacky and letting
other plugins use fu-dell-common as needed.
2017-01-30 15:48:54 -06:00
Mario Limonciello
8c7b98da56
synapticsmst: Iterate all nodes rather than hardcoding to 3
2017-01-26 17:06:22 -06:00
Richard Hughes
7ed92084ac
trivial: Fix make distcheck
2017-01-25 09:54:00 +00:00
Mario Limonciello
2663c0b865
trivial: thunderbolt: typo in Makefile.am
2017-01-23 11:28:10 -06:00
Mario Limonciello
493b63f6cc
trivial: shuffle fu-dell-flash into fu-dell-common
...
This will make sharing common functions from the dell plugin with
others easier
2017-01-23 11:27:03 -06:00
Mario Limonciello
d25200fc66
thunderbolt: Add special handling for safe mode on Dell systems ( #84 )
...
* thunderbolt: Add special handling for safe mode on Dell systems
Dell systems are known to have the Model ID the same as the SystemID
that can be recovered from libsmbios. If the thunderbolt controller
is in safe mode, identify with this ID to allow the controller to be
flashed with a good FW.
2017-01-23 17:10:31 +00:00
Yehezkel Bernat
94e7f75ef3
Updates for thunderbolt plugin
...
* Minor changes in Thunderbolt README file
* Remove PCI-oriented GUID
* Handle Thunderbolt controller in safe-mode
* Get progress status updates for Thunderbolt
* Fix for Thunderbolt FW version display
* Style changes from pull request review
2017-01-21 15:44:26 +00:00
Mario Limonciello
ceb0ea9582
trivial: synaptics: don't advertise device remote control out to the plugin or tool
2017-01-20 16:26:56 -06:00
Mario Limonciello
eebf9f9c7d
synapticsmst: fix cascade support in the plugin
...
There was a lot of confusion about when remote control was turned
on or off leading to dsyfunctional cascade support.
This has been confirmed to work for querying and flashing both
VMM3320s in a Rugged Latitude 5414 + dock.
2017-01-20 16:22:31 -06:00
Richard Hughes
df9cc282ec
trivial: Only build the synapticsmst if HAVE_SYNAPTICS is set
2017-01-20 12:52:58 +00:00
Mario Limonciello
72f905d846
trivial: dell: fix test suite
...
Commit cd87fca
broke running the test suite on machines without
UEFI capsule support.
2017-01-19 14:16:23 -06:00
Richard Hughes
67a756c93f
synapticsmst: Refactor away the global state
...
The synapticsmst-common.c file had some global state so that cascade devices
could use the device fd. This made the control flow error prone, and it meant
that the fd could be leaked trivially on any error path.
Moving the fd ownership to the device is the logical place for the control, and
means we can create "connections" to access the main device and the cascade
devices.
This fixes the warnings detected by Coverity.
2017-01-19 13:41:04 +00:00
Richard Hughes
fffa21639b
trivial: unindent a code block
2017-01-19 08:51:16 +00:00
Richard Hughes
d99282f2ca
trivial: Fix an anti-pattern when returning error strings
2017-01-19 08:43:06 +00:00
Richard Hughes
2ef5ae0536
trivial: dell: Fix some intenting that was making coverity unhappy
2017-01-18 08:32:45 +00:00
Mario Limonciello
836ff015b3
trivial: synaptics: on new systems show unknown rather than failing
2017-01-17 16:08:04 -06:00
Mario Limonciello
7d5003e643
trivial: synaptics: don't fail on systems with less DP aux nodes
2017-01-17 13:23:46 -06:00
Mario Limonciello
548c6901c4
trivial: synaptics: add missing ID string for Rugged platforms
2017-01-17 12:13:59 -06:00
Mario Limonciello
0ed79d5455
trivial: synaptics: log invalid board IDs
2017-01-17 12:02:15 -06:00
Mario Limonciello
cd87fcae5a
trivial: dell: don't disable plugin if UEFI capsule isn't supported
...
It now supports enabling things for other plugins too, so rather
mark any devices created by Dell as only readable, not flashable
when UEFI capsule is off.
2017-01-17 11:49:33 -06:00
Mario Limonciello
908b17e1fb
trivial: dell: Don't output error domain twice
2017-01-17 11:38:34 -06:00
Mario Limonciello
f48a93546e
trivial: dell: only enable coldplug delay when needed
...
The coldplug delay that Dell uses is only needed for the thunderbolt
and synaptics MST plugins.
2017-01-17 11:35:20 -06:00
Richard Hughes
31fd185ecf
trivial: Fix make distcheck
2017-01-17 15:44:52 +00:00
Richard Hughes
6a9c91a083
trivial: Fix a trivial warning in the altos plugin
2017-01-17 15:37:08 +00:00
Richard Hughes
8dafc604e0
trivial: Fix up the typedef'd enum style
2017-01-17 14:15:00 +00:00
Richard Hughes
2153cd0f89
trivial: Use guint8 rather than guchar
...
Although it's probably the same, this matches the other plugins.
2017-01-17 14:10:12 +00:00
Richard Hughes
26aade02d2
trivial: Don't use caps in variable names
2017-01-17 13:21:14 +00:00
Pei-Chen Huang
9225270421
trivial: fix synaptics device scan cascade function
2017-01-17 06:23:45 -06:00
Richard Hughes
3d8d48c896
trivial: Remove boilerplate gtk-doc from plugin
2017-01-17 11:17:29 +00:00
Richard Hughes
0c91cb0a94
trivial: Don't output the error domain twice
2017-01-17 11:17:29 +00:00
Richard Hughes
ae040f77b8
trivial: Fix some indenting in synapticsmst
2017-01-17 11:17:29 +00:00
Richard Hughes
94ce14f317
trivial: Use rc for return codes
...
The variable ret is normally reserved for boolean values.
2017-01-17 08:58:40 +00:00
Richard Hughes
1967c6c9ac
trivial: Fix up some missing return value assignments
...
Spotted by coverity.
2017-01-17 08:54:34 +00:00
Richard Hughes
db0a3cb37f
trivial: Fix up some indent issues spotted by coverity
2017-01-17 08:54:03 +00:00
Richard Hughes
999f66ab13
trivial: Actually set the Unifying device name
2017-01-16 22:00:40 +00:00
Mario Limonciello
f53e4a2d4b
trivial: synapticsmst: only enable plugin if kernel support is present
2017-01-16 15:37:11 -06:00
Mario Limonciello
8eaf6dbcd6
trivial: synapticsmst: don't proceed if device open fails
2017-01-16 15:14:47 -06:00
Pei-Chen Huang
abac1640a5
synapticsmst: Add cascade support
2017-01-16 11:23:43 -06:00
Mario Limonciello
24afb470f2
Introduce plugin for Synaptics MST hubs
2017-01-16 11:23:43 -06:00
Richard Hughes
e3c8832dd0
trivial: Fix a critical warning when removing thunderbolt devices in safe mode
2017-01-11 21:51:21 +00:00
Mario Limonciello
038d386a82
dell: introduce a standalone (noinst) tool to force mode flashes
2017-01-11 15:35:55 -06:00
Richard Hughes
2520b7d1ed
trivial: Add some debugging in the thunderbolt plugin
2017-01-11 17:24:20 +00:00
Richard Hughes
26adb3c819
trivial: Fix a crash when flashing a thunderbolt controller in safe mode
2017-01-11 17:21:10 +00:00
Mario Limonciello
0d92e865aa
trivial: thunderbolt: don't allocate new plugin data on rescan
2017-01-10 19:55:12 -06:00
Mario Limonciello
9df75f7206
trivial: dell: move coldplug delay setting to startup()
2017-01-10 17:13:08 -06:00
Richard Hughes
cd35e3c242
trivial: Fix a compile warning when doing a unifying control transfer
2017-01-10 22:10:50 +00:00
Richard Hughes
04ec912b19
trivial: Fix some colorhug function name prefixes
2017-01-10 22:10:50 +00:00
Richard Hughes
932eb397d2
trivial: Fix 'make distcheck'
2017-01-10 22:10:50 +00:00
Mario Limonciello
592ab30b3c
trivial: dell: update_prepare/update_cleanup on only certain plugins
2017-01-10 15:39:25 -06:00
Richard Hughes
23b9c9d78d
trivial: Use the per-plugin cache for the runtime device
...
There is no point having two hash tables doing the same thing...
2017-01-10 16:09:38 +00:00
Richard Hughes
0de35b058d
unifying: Subclass FuDevice like the altos plugin
2017-01-10 16:09:32 +00:00
Richard Hughes
a4e44ce39b
altos: Set the flags in the init_real so they work for the cmdline tool
2017-01-10 16:09:32 +00:00
Richard Hughes
b721d4326f
ebitdo: Subclass FuDevice like the altos plugin
...
This makes things much simpler.
2017-01-10 14:02:16 +00:00
Richard Hughes
dc390e3a68
trivial: Set up two flags not set by cfmakeraw()
2017-01-10 12:49:52 +00:00
Richard Hughes
7a44ff9748
altos: Add error checking when using termios
2017-01-10 12:48:08 +00:00
Richard Hughes
b082903c5f
Add fu_plugin_set_coldplug_delay() to allow hardware to initialize if required
2017-01-10 09:27:08 +00:00
Richard Hughes
10ec93b187
Revert "thunderbolt: add some guards around empty arrays"
...
This reverts commit 5f1c991c40
.
2017-01-09 21:34:43 +00:00
Richard Hughes
efa55b83a7
dell: Fix possible linker problem
...
The linker does not know which public symbol to call if a plugin calls it's own
symbol. Without this change one plugin could call into another plugin with the
wrong GsPluginData set.
2017-01-09 21:32:44 +00:00
Richard Hughes
2b464378ea
trivial: Add flags to fu_device_altos_write_firmware()
2017-01-09 21:25:50 +00:00
Mario Limonciello
2bcc151619
dell: Adjust the coldplug preparation and cleanup sequence
...
Unfortunately no indication is made that a GPIO change is
done so some time needs to be left to make sure this happened.
2017-01-09 13:31:35 -06:00
Mario Limonciello
5f1c991c40
thunderbolt: add some guards around empty arrays
...
Depending upon the call order and devices coming or going these
may or may not have anything actually contained which will cause
segfaults otherwise.
2017-01-09 11:11:19 -06:00
Richard Hughes
05133fefb7
Add support for flashing the ChaosKey
2017-01-09 12:21:35 +00:00
Richard Hughes
4ff3169556
thunderbolt: Detecting new devices and add an actual device to the daemon
...
Also, add an untested update implementation.
Based on a patch by Eric Rubin-smith <ericx.rubin-smith@intel.com>, many thanks.
2017-01-08 16:14:35 +00:00
Richard Hughes
1d511fafa6
trivial: Fix a uninitialized value in the dell plugin
...
Spotted using clang.
2017-01-07 22:14:28 +00:00
Richard Hughes
c7ea2a2369
trivial: Fix up two compile warnings
2017-01-07 22:10:14 +00:00
Richard Hughes
46487c944a
Add the ability to run a prepare->exec->cleanup on coldplug
...
The idea here is that plugins can 'wake up' hardware in prepare, and put it
back into powersaving mode when doing cleanup.
2017-01-07 21:26:36 +00:00
Richard Hughes
57d8bf6590
trivial: Fix a compile warning in the dell plugin
2017-01-07 21:15:46 +00:00
Mario Limonciello
5723c2f643
dell: Add coldplug methods to let other plugins turn on TBT/GPIO
...
Remove the dummy devices created for NVM and MST, these will
be created by other plugins. Other plugins will however
be using the Dell methods to enable these devices.
2017-01-06 15:25:57 -06:00
Mario Limonciello
ddeb0297bf
trivial: dell: remove unnecessary usb_ctx after moving to plugins
2017-01-06 12:03:21 -06:00
Mario Limonciello
49c96b8941
trivial: dell: remove unnecessary include
2017-01-06 12:03:21 -06:00
Richard Hughes
7ceb318a27
Add fwupd_result_get_device_version_bootloader()
...
This functionality is required so that AppStream metadata can check the fwupd
version, the firmware version, bootloader version or a combination of all three.
2016-12-23 11:21:22 +00:00
Richard Hughes
0075a98b51
unifying: Use the actual bootloader VID/PIDs when in firmware mode
2016-12-16 21:24:55 +00:00
Richard Hughes
04042a10e8
trivial: Fix a tiny memory leak in the Udev plugin
...
Also, fix some method prefixes to match the plugin name.
2016-12-16 14:03:08 +00:00
Richard Hughes
a59777ad8d
Add initial skeleton for Intel Thunderbolt support
2016-12-16 12:41:57 +00:00
Richard Hughes
598a40d746
trivial: Use a delay when adding Udev devices
...
There might be a better plugin to claim these than the generic fallback.
2016-12-16 12:41:57 +00:00
Richard Hughes
ae3d65f60b
Move the device add delay to shared code
...
This allows us to reuse the logic in other plugins.
2016-12-16 12:41:57 +00:00
Richard Hughes
74702297b2
Move the Option ROM parsing to the Udev plugin
2016-12-15 17:09:38 +00:00
Mario Limonciello
3b09e323c8
trivial: whitespace fixes in dell plugin
2016-12-15 10:30:41 -06:00
Mario Limonciello
9bb952ac7e
dell: add a new method for forcing a controller to flash mode
...
This method will be used in conjunction with other new plugins
in the future that will perform online flashes.
2016-12-15 10:30:37 -06:00
Richard Hughes
0c7c4e4406
trivial: Use the HIDPP constants from libratbag
2016-12-15 16:26:30 +00:00
Richard Hughes
561c457149
trivial: Use unique profiling IDs in plugins
2016-12-15 12:55:21 +00:00
Richard Hughes
c591460ff8
trivial: Fix a warning when compiling the unifying plugin
2016-12-14 10:52:44 +00:00
Mario Limonciello
02ccecb2be
fix dfu plugin loading
...
failed to open plugin
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
failed to open plugin:
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
undefined symbol: dfu_device_upload
2016-12-13 13:19:55 -06:00
Mario Limonciello
f074b0d367
Fix udev plugin loading
...
failed to open plugin /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
failed to open plugin: /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
undefined symbol: g_udev_device_get_property
2016-12-13 13:19:51 -06:00
Mario Limonciello
e781bb9b64
trivial: fix cosmetic fallout from provider -> plugin
...
some code (such as libfwupd) still internally refers to provider,
but this will need to be more carefully massaged
2016-12-13 12:25:09 -06:00
Mario Limonciello
6a1cbc61b2
trivial: correct raspberry pi error message
2016-12-13 12:03:49 -06:00
Richard Hughes
4232185bec
trivial: Remove some false-positive messages when using clang
2016-12-13 16:01:52 +00:00
Richard Hughes
ee54d32f4d
trivial: Fix a Coverity false positive
2016-12-12 17:02:10 +00:00
Richard Hughes
59a9344c1e
Move the UPower functionality to a plugin
2016-12-12 16:28:16 +00:00
Richard Hughes
864363e139
Add support for Logitech Unifying devices
...
If you do not have Unifying hardware you can emulate writing firmware using:
$ fu-unifying-tool write file.hex -v --emulate=bootloader-nordic
2016-12-12 15:36:53 +00:00
Richard Hughes
cff38bcb3a
Convert the providers to plugins to simplify code and for future features
...
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.
Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.
This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.
This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.
If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00
Richard Hughes
319a6bab12
Move the plugins into plugin-specific directories
...
This will allow us to add further documentation here in the future.
2016-12-12 11:52:03 +00:00