Commit Graph

952 Commits

Author SHA1 Message Date
Richard Hughes
10b2fef1bd trivial: Fix a 'Comparison is always true' LGTM warning
Not a bug, but somewhat muddled logic I guess.
2019-02-12 06:28:51 -06:00
Richard Hughes
c909ab3f3c unifying: Fix regression when recovering from failed flash
The unifying version numbers are of the form 'RQR24.00_B0000' which means we
have to force the plugin to 'plain' version format to avoid stripping out the
non-semver chars.

Fixes https://github.com/hughsie/fwupd/issues/1018
2019-02-12 10:00:02 +00:00
Richard Hughes
bfd946e463 Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
Mario Limonciello
eb8b38f158 trivial: storage: Update minimum Dell component ID length to 6
Dell storage team confirmed that nothing shorter than 6 will ever
be used and so this heuristic can be stronger.
2019-02-08 16:06:14 +00:00
Mario Limonciello
2e9a4242c5 trivial: dell-dock: bump passive requirement to EC25+
Turns out we can't have nice things that work properly just yet.
2019-02-08 06:31:21 +00:00
Richard Hughes
b3aa793539 thunderbolt: Convert the instance IDs as we never open the device 2019-02-07 18:56:15 +00:00
Richard Hughes
90112823df udev: Manally call fu_device_setup() to convert the instance IDs
The udev plugin is somewhat special as it uses a non-subclassed FuDevice that
never gets 'opened'.

This means that we never automatically call fu_device_setup() and thus the
instance IDs are not converted into GUIDs before the device is added.
2019-02-07 11:26:50 -06:00
Richard Hughes
5df0e7de30 trivial: Fix the spelling of 'module' in wac-usb 2019-02-06 14:48:48 +00:00
Richard Hughes
2b005b2869 wacom-usb: Record the block number when failing 2019-02-06 14:48:48 +00:00
Richard Hughes
90d3075a5d wacom-usb: The touch address is big endian
The example in the specifications should have told us that...
2019-02-06 14:48:48 +00:00
Richard Hughes
6fe54f23e0 wacom-usb: Accept a non-binary IHEX file for the touch update 2019-02-06 14:48:48 +00:00
Richard Hughes
409ccd6142 trivial: Use fu_common_dump_raw() in wacom-usb 2019-02-06 14:48:48 +00:00
Richard Hughes
c91ec869be wacom-usb: Only poll when the device status is 'busy' 2019-02-06 14:48:48 +00:00
Richard Hughes
7c6009038e wacom-usb: Only reboot the device when all composite devices have been updated 2019-02-06 14:48:48 +00:00
Richard Hughes
4530c44f2d wacom-usb: Fix flashing failure with latest Intuos Pro tablet
The checksum is now stored as the very last flash descriptor, so we need to pad
the SREC data to include the 'missing' data range. As we're doing that, we
should optimize like the Wacom updater does and skip writing descriptors that
are unused.
2019-02-06 14:48:48 +00:00
Richard Hughes
040ac626b5 dfu: Fill holes when reading SREC files
It is perfectly valid to have non-continuous ranges, so fill in any holes like
we do for Intel HEX files.
2019-02-06 14:48:48 +00:00
Richard Hughes
6b78d64987 Add fwupd_guid_from_string() to drop dep on uuid
This also allows us to write mixed-endian structures and adds tests. As part of
this commit we've also changed the API of something that's not yet been in any
tarball release, so no pitchforks please.
2019-02-06 14:48:04 +00:00
Richard Hughes
0b0fab8fed wacom-raw: Check the InstanceID rather than GUID
Since the _NO_AUTO_INSTANCE_IDS change we need to actually check the ID, rather
than the GUID.
2019-02-06 08:02:16 +00:00
Richard Hughes
1bc432316a Defer the InstanceID->GUID hashing until after setup
This allows hardware from OEMs to *not* match generic firmware supplied by the
device manufacturer. The idea being, that the OEM will supply firmware that
will actually work on the device.

Based on a patch from Mario Limonciello, many thanks.
2019-02-06 08:02:16 +00:00
Mario Limonciello
2472e45ac6 ata: Check for USB enclosures as well
I noticed that a SATA drive connected to an USB2.x to ATA bridge was
recognized as internal otherwise.
2019-02-05 20:29:26 +00:00
Richard Hughes
b8c30b8732 Do not use efivar just to print a mixed endian GUID 2019-02-04 15:19:57 +00:00
Richard Hughes
65c81921b6 Add fu_device_add_instance_id() and prefer explicit conversion 2019-02-04 15:19:57 +00:00
Richard Hughes
592baedfff Export some of the GUID functionality 2019-02-04 15:19:57 +00:00
Richard Hughes
5297678d3c Allow a plugin to set _ANOTHER_WRITE_REQUIRED to run more than one plugin
For this to work with different plugins the device IDs must match.
2019-02-04 14:54:54 +00:00
Richard Hughes
c6c312f267 trivial: Move fu_plugin_runner_schedule_update() into the engine 2019-02-04 14:54:54 +00:00
Mario Limonciello
8efc5a3633 nvme: Add an extra check for Dell plugins to avoid false positives
Component IDs should always be ASCII characters.
None have been reported yet, but this should still help to prevent them.
2019-02-04 10:39:20 +00:00
Mario Limonciello
b503aa8650 ata: Add support for detecting Dell GUIDs
Similar to NVME, ATA drives distributed by Dell have special values
that should be used to designate fwupd GUIDs and only run correct
firmware.

When detecting Dell GUIDs remove the standard fwupd GUIDs.  "Generic"
firmware targeted to those GUIDs will fail to install.
2019-02-04 10:39:20 +00:00
Mario Limonciello
b05a918431 trivial: Move GUID testing into fu-common-guid
This allows other plugins to use this part of the routine.
2019-02-04 10:39:20 +00:00
Richard Hughes
96e6783982 trivial: Fix potential compile failures for high -j values 2019-02-01 16:52:16 +00:00
Richard Hughes
1e07ec95b6 uefi: Disable -Wno-address-of-packed-member
Unaligned reads don't really matter on all the architectures the EFI binary is
being built for.
2019-02-01 16:38:14 +00:00
Richard Hughes
c6b94791ec uefi: Don't unconditionally enable Werror for the EFI binary 2019-02-01 16:38:14 +00:00
Richard Hughes
0a26551bf3 ata: Default to the non-activation 0xE subcommand
During download and activation we have to reset the drive to apply the new
firmware. If the kernel gets an unexpected ATA reset then it might panic.
Default to activating the command on the next drive power-up to be safe.

Many thanks to the Dell storage team for the advice.
2019-02-01 06:13:38 -06:00
Aleksander Morgado
0f0da353c2 fastboot: Use a much longer timeout as the removal delay
A device that has gone through a fastboot update may need more than
the previous default of 10s to come back up. Just use a much longer
value to make sure it's detected properly.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 10:26:43 +00:00
Mario Limonciello
303c4f0f90 trivial: upower: correct a logic error from ed021ab
When unable to read battery value this should return FALSE to indicate
AC power.
2019-01-31 14:56:08 -06:00
Mario Limonciello
1d26689b2f trivial: dell-dock: mirror update status from passive flow
If fwupd is restarted multiple times before dock is unplugged, don't
let any devices update if we can avoid it.
2019-01-31 10:53:54 -06:00
Mario Limonciello
ead0deaa25 trivial: dell-dock: enable passive flow on all EC23+
The feature did land in EC23 and testing looks positive.
2019-01-31 10:53:54 -06:00
Richard Hughes
206b70120d dfu: Simplify the SREC parser to avoid a crash with an invalid file
Splitting the file into lines does increase memory usage, but allows us to use
a much simpler parser design. This is just like we fixed IHEX a few weeks ago.
2019-01-31 16:05:34 +00:00
Richard Hughes
ccc79c9fbc trivial: Split out strnsplit for future use 2019-01-31 16:05:34 +00:00
Richard Hughes
c1fad937d8 wacom-raw: Use the correct error codes when the panel is not supported
Otherwise, we get a nasty red console warning when plugging in a *USB* panel.
2019-01-31 11:55:48 +00:00
Richard Hughes
a3b13046c2 wacom-usb: Add some more information to the README 2019-01-31 11:55:12 +00:00
Mario Limonciello
769f990cf6 trivial: dell: filter another dock SKU from this plugin
Prevents showing errors in the logs
2019-01-30 11:00:45 -06:00
Mario Limonciello
423dde520c dell: Check that the flash interface command is available
This prevents the kernel showing errors when running on systems
without this command.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=202259
2019-01-30 11:00:45 -06:00
Richard Hughes
52b9800744 wacom-usb: Fix the plugin name to allow devices to be updated 2019-01-30 13:09:54 +00:00
Richard Hughes
b9b6834f54 trivial: Add FuFastbootDeviceReadFlags to fu_fastboot_device_cmd() 2019-01-30 12:14:17 +00:00
Aleksander Morgado
046c84b5b3 fastboot: flash the partition after downloading the file 2019-01-30 12:14:17 +00:00
Richard Hughes
44ce5aeae4 uefi: Add a quirk to use the legacy bootmgr description
Some hardware from Lenovo deduplicates UEFI Boot entries, and uses the old
string 'Linux-Firmware-Updater' to avoid removing the firmware update entry.
Although this is forbidden in the UEFI specification we shouldn't break
firmware updates from old firmware versions.

Provide a quirk for this, and automatically whitelist anything with the LENOVO
SMBIOS Manufacturer.
2019-01-30 12:13:39 +00:00
Richard Hughes
dd0264d0ef ata: Mark all devices as needing a reboot
Although not strictly required, I would feel a lot more warm and fuzzy knowing
the drives are running the new firmware ASAP.
2019-01-30 06:10:36 -06:00
Richard Hughes
0bf8ee810b ata: Add a new plugin to upgrade firmware on ATA/ATAPI hardware
Some of the ATA12 fixup code is by Mark Lord, taken from the hdparm project.

Fixes: https://github.com/hughsie/fwupd/issues/946
2019-01-29 22:28:09 +00:00
Richard Hughes
4fef28d0ac trivial: Add the missing protocol IDs to the plugin READMEs 2019-01-29 22:28:09 +00:00
Richard Hughes
f6838c738a trivial: Add fu_udev_device_get_slot_depth()
We'll need this for another plugin soon.
2019-01-29 22:28:09 +00:00