Commit Graph

903 Commits

Author SHA1 Message Date
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
Mario Limonciello
5502cd5689 dell-dock: Add support for a passive flow
This behavior will prevent the dock from performing most resets until
it has been unplugged from a host system.

This significantly speeds up the perceived update duaration and prevents
data loss during update.

It's not confirmed whether EC23 or later EC will enable it.
* So only enable by a custom flag until this is confirmed.
* Custom flag will be dropped when included into stable EC release.

This functionality also relies upon the CAB file providing a message warning
user that the dock might not be usable after unplugging for up to 1 minute.
2019-01-29 15:51:12 -06:00
Richard Hughes
0a212fd1d6 uefi: Add a trivial debugging statement to debug a UX capsule failure 2019-01-25 11:04:35 +00:00
Richard Hughes
9ba9d8a98b uefi: Use fwup_new0() to allocate the updates table array
Although malloc probably works due to the page size, it's not the thing to use.
2019-01-25 11:04:30 +00:00
Szczepan Zalega
f80bb89238 nitrokey: Correct Nitrokey Storage invalid firmware version read
Currently used structures were based on early libnitrokey definitions
(which were broken for some time). Corrected their sizes and elements,
and added tests.

Fixes #960

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-01-25 09:53:05 +00:00
Mario Limonciello
654b583031 trivial: dell-dock: Correct a left shift error in BIT_CLEAR macro 2019-01-24 10:35:53 -06:00
Mario Limonciello
d6e453b0ba dell-dock: Add support for flashing Thunderbolt over I2C
This uses an API in the Realtek USB 3.1G2 controller to perform
the flash procedure.
2019-01-24 16:23:00 +00:00
Richard Hughes
367f4590d6 wacom-raw: Add a plugin to update Wacom embedded EMR and AES panels 2019-01-24 10:18:40 +00:00
Richard Hughes
42c514764a dfu: Ignore the SUB ASCII value
This is probably written by a non-free post-processing tool and can be ignored.
2019-01-22 14:43:13 +00:00
Richard Hughes
720b5deb00 dfu: Fix the parser to support extended segment addresses
Split the data into lines, which is less efficient but also much easier to
understand and debug.
2019-01-22 14:43:13 +00:00
Richard Hughes
f6a6fe8ec5 dfu: Support ihex files with leading comments
Also look for the EOF in the file.
2019-01-22 14:43:13 +00:00
Mario Limonciello
b13f784462 trivial: dell: When plugging in a dock supported by dell-dock don't show an error
Some aspects of the method for querying dock firmware do work in 'dell' plugin
but that is not useful for fwupd because it's incomplete.

Due to this the following error shows up in fwupd journal if run on a Dell system
when the new Dell dock is plugged in:
failed to add USB device 0bda:8153: failed to add device using on dell: invalid dock component request Query 3 0 2 4 0

Detect this scenario, and prevent showing errors in logs.
2019-01-22 09:11:50 +00:00
Mario Limonciello
68fb11f453 uefi: Correct a boot order creation bug (Fixes: #956)
Unfortunately the previous fix (6131f5d) introduced this bug.

The code previously was actually looking for the non-zero case
which was correct, but non-obvious since `efi_guid_cmp` works like
`g_strcmp0` where a match returns zero.

So rather than revert 6131f5d make this completly explicit.
2019-01-22 07:28:32 +00:00
Richard Hughes
088c258894 trivial: Make one uefi function static 2019-01-20 22:29:44 +00:00
Richard Hughes
c7327385f4 uefi: Remove all variable length arrays 2019-01-20 22:29:44 +00:00
Richard Hughes
31c10b7293 uefi: Fix a logic bug in fwup_search_file()
If n_handles==0 then we'd return with EFI_SUCCESS, rather than failure.
2019-01-20 22:29:44 +00:00
Richard Hughes
59407ca42d uefi: Use _cleanup_free in one more place 2019-01-20 22:29:44 +00:00
Richard Hughes
00b87884c4 uefi: Do not pass required attrs to fwup_delete_variable()
This lets us refactor some code and remove some complexity.
2019-01-20 22:29:44 +00:00
Richard Hughes
aa6498866c uefi: Delete the old Linux-Firmware-Updater boot entry 2019-01-20 22:29:44 +00:00
Richard Hughes
525433e4de uefi: Use the GNU-EFI BOOL type 2019-01-20 22:29:44 +00:00
Richard Hughes
818071d178 uefi: Refactor and simplify the EFI loader 2019-01-19 18:36:46 +00:00
Richard Hughes
f425d29a28 Show a console warning if loading an out-of-tree plugin
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
4e30d25668 UEFI: Do the UX checksum calculation in fwupd
This makes the EFI binary much simpler.
2019-01-18 19:27:21 +00:00
Richard Hughes
09bf3b5246 trivial: Don't manually zero-fill efi_ux_capsule_header_t 2019-01-18 19:27:21 +00:00
Richard Hughes
4bdb513937 trivial: Make the capsule_image_size calculation more obvious 2019-01-18 19:27:21 +00:00
Richard Hughes
e554c1b501 trivial: Clarify our position on proprietary plugins 2019-01-18 12:21:46 -06:00
Richard Hughes
5dc757f6c1 wacom-usb: Add two more Intuos tablets
These do not need the runtime-version quirk like the others.
2019-01-18 16:11:53 +00:00
Richard Hughes
4a68fd60dc nvme: Add the needs-shutdown quirk to Phison NVMe drives
Affected drives should have a prominent statement in the update description,
possibly even the first line so it shows up by default in the updates panel.
2019-01-17 16:35:34 +00:00
Richard Hughes
b91efa6c38 trivial: Cast to FuDevice from FuUdevDevice 2019-01-17 16:35:34 +00:00
Richard Hughes
72c18fd4e4 Use GCC __cleanup__ features in the EFI loader
This simplifies memory management.
2019-01-16 12:06:09 -06:00
Richard Hughes
fc90f3954e nvme: Add flag to support manually aligning the firmware to the FWUG value
This is required for drives from Phison.
2019-01-16 13:14:50 +00:00
Richard Hughes
d5f0da15ab nvme: Support FGUID to get the SKU GUID 2019-01-16 13:14:50 +00:00
Richard Hughes
a9d81cfb10 nvme: Support FWUG to get the write block size 2019-01-16 13:14:50 +00:00
Richard Hughes
1eaf71c91b nvme: Add trivial comment to clarify address bitshifting 2019-01-16 13:14:50 +00:00
Richard Hughes
b6e9dacc9a uefi: Do not check the BGRT status before uploading a UX capsule
Microsoft description about the Status is:

    The Status field of the BGRT describes whether the image is currently
    displayed on the screen. This is not applicable to the firmware update
    display capsule.

Many thanks to Steven Chang for identifying this issue.

Fixes: https://github.com/hughsie/fwupd/issues/935
2019-01-16 13:08:48 +00:00
Richard Hughes
e58fa31887 dfu: Fix flashing various Jabra devices
Do not unset the quirks when closing the device, the _NO_DFU_RUNTIME quirk is
needed when re-opening the device during detach.

Fixes https://github.com/hughsie/fwupd/issues/927
2019-01-16 11:22:05 +00:00
Mario Limonciello
ed021ab448 upower: Add support for checking battery percentage
On any devices that normally would require checking for AC also
check that at least one battery on the system has at least 30% to
perform an update.

Fixes: #925
2019-01-15 10:43:18 -06:00
Mario Limonciello
78efa4d2a6 trivial: thunderbolt: If unable to find inactive nvmem, don't mark updatable
This situation may happen in the future in systems where the TBT NVM is embedded
in a different location and only upgradable through system firmware.
2019-01-15 10:33:52 -06:00
Richard Hughes
fa8b7aab0a nvme: Check the return code of the admin passthru ioctl
This meant we reported firmware update success when the image format or offset
was incorrect.
2019-01-15 16:26:30 +00:00
Mario Limonciello
18f3ab4e4d trivial: dell-dock: Prohibit downgrades on board 4 or later below EC19
Some SKUs of board 4 and later have silicon that will not work with anything
but EC19 or later.  So once flashed up to EC19 prohibit downgrades below that
to keep from bricking devices.
2019-01-15 08:52:12 +00:00
Mario Limonciello
84e948a5b0 trivial: dell-dock: correct an assertion related to setting EC version
This is probably fall out from a previous code re-shuffling.
The EC version is already set elsewhere, and in many cases `self->ec_version`
is `NULL` at this time.
2019-01-10 13:44:48 -06:00
Mario Limonciello
8963d6b4b2 dell-dock: Set minimum board to board 4
This allows dropping all the quirks related to older boards.
2019-01-08 12:36:36 -06:00
Mario Limonciello
993fc1636c dell-dock: Workaround a manufacturing bug for board level 4
Board 4 was manufactured with package version 89.16.01.00 and this
will prevent properly upgrading between releases.  Reset this version
to 00.00.00.00 if detected on this board.
2019-01-08 12:36:36 -06:00
Mario Limonciello
b4e3698cfb dell-dock: Wait longer for re-enumeration on TBT SKU
Emperically this seems to take 7-10 seconds longer on this SKU.
2019-01-08 12:36:36 -06:00
Richard Hughes
831eb7ef7e superio: Support IT89xx devices
We can switch to LDN 0x11 and read the IO base address for the PM1 legacy port
rather than hardcoding data and command ports.
2019-01-08 12:53:57 +00:00
Richard Hughes
305f1f2ab1 trivial: Add some debugging data to wacom-usb 2019-01-02 09:50:39 +00:00
Richard Hughes
0e17e6d030 Fix building with -Wl,-z,defs
This allows us to find undefined references at compile time, not runtime.
2018-12-25 16:10:54 -06:00
Richard Hughes
363127e518 ebitdo: Fix the reported version number if the daemon locale is not C.UTF-8
Always use a dot as the delimiter of a semver rather than treating it as a
floating point number.

Related to https://github.com/hughsie/lvfs-website/issues/216
2018-12-25 16:09:45 -06:00
Miklós Márton
7f59a6f844 Add Dell TB18DC to the known devices list 2018-12-25 16:08:10 -06:00
Richard Hughes
420ccd46fa Allow replacing the last byte in the image when using 'dfu-tool replace-data'
Fixes https://github.com/hughsie/fwupd/issues/903
2018-12-18 08:35:24 +00:00