Commit Graph

1549 Commits

Author SHA1 Message Date
Richard Hughes
7b0023de7f ep963x: Remove some dead code spotted by Coverity 2020-04-21 16:45:31 +01:00
Richard Hughes
b74db0618c ccgx: Only update the FW2 partition of the ThinkPad USB-C Dock Gen2 2020-04-21 14:34:03 +01:00
Richard Hughes
6adbcd2e62 ccgx: Expand the FWImageType for future hardware
This is needed to handle devices that do need the bootloader updated before the
actual firmware image.
2020-04-21 14:34:03 +01:00
Richard Hughes
53e22ed0c1 wacom-usb: Fix a theoretical buffer over-read to make GCC happy 2020-04-20 15:50:10 +01:00
Richard Hughes
36f3218da9 vli: Only show the i2c devices on the USB3 hub
If the hub is running in degraded USB2 recovery mode do not enumerate the
easy-to-brick MSP430 device.
2020-04-18 14:52:50 +01:00
Richard Hughes
ec279f161c ccgx: Always report 100% when finished writing 2020-04-17 21:49:15 +01:00
Richard Hughes
da645fe912 ccgx: Set the device name and summary from quirk files
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-17 21:48:02 +01:00
Richard Hughes
cacf14e54f trivial: Add OUI quirk for Toshiba 2020-04-17 18:48:35 +01:00
Richard Hughes
518712ac09 vli: Only do the APP5 FW bug fix on affected hardware 2020-04-17 16:09:32 +01:00
Richard Hughes
5997f2a7da vli: Show all the buffer when debugging with FWUPD_VLI_USBHUB_VERBOSE 2020-04-17 14:15:50 +01:00
Richard Hughes
08d5caa758 ccgx: Split out a trivial helper to set the instance IDs
As a consequence, the version number is also set in the event that the silicon
or firmware app-id is not set, which also seems like the right thing to do.
2020-04-16 15:52:55 +01:00
Richard Hughes
919d90e941 ccgx: Set the device name to be more useful
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-16 15:52:55 +01:00
Richard Hughes
e419792c61 ccgx: Set the logical ID as the FwMode 2020-04-16 15:52:55 +01:00
Richard Hughes
d41e8254ca ccgx: Split out a trivial function to set the version 2020-04-16 15:52:55 +01:00
Richard Hughes
71f5eaa371 ccgx: Do not reboot the device write after installing
Since a8c6c0 we do not conditionalize the attach on the BOOTLOADER flag, and so
attach gets run once manually, and then again automatically.
2020-04-16 15:52:55 +01:00
Richard Hughes
54e3feae12 ccgx: Do no show the flash parameters when unknown 2020-04-16 15:52:55 +01:00
Richard Hughes
1283c2696d Do not skip attach() if the device is marked _WILL_DISAPPEAR
The idea here is that the device would not come back after it was restarted,
and skipping the attach in the engine was only working around the fact that the
ebitdo did not split out an ->attach() function.

We can't really blame it; we only decoupled the _IS_BOOTLOADER requirement
for ->attach() recently...
2020-04-16 08:43:45 -05:00
Richard Hughes
a1ef52e5f9 dell-dock: Port to using fu_device_get_proxy()
This also cleans up the memory handling to prevent a ref-cycle loop that
prevented the dock devices from being finalized if the dock was removed.
2020-04-15 20:34:31 +01:00
Richard Hughes
e95613f670 vli: Do not show the USB 2 recovery devices for USB 3 hubs
The USB 2.0 controller is used as a 'backup' in case the USB 3.0 firmware fails
to start. Set USB 3 hubs as a greater priority so that the USB 2 ones do not
not get added if the USB 3 firmware is working.
2020-04-15 14:11:06 +01:00
Richard Hughes
95c3bf2617 vli: Add metadata to identify which is the same physical device 2020-04-15 14:11:06 +01:00
Sam Morris
6a161aa1d1 uefi: correctly format firmware version of Dynabook (né Toshiba) X30, X40 and probably others
Fixes #1998
2020-04-15 13:00:26 +01:00
Richard Hughes
a86b08f27c synaptics-cxaudio: Use the ->attach() device vfunc
This allows us to test the device reset using fwupdtool.
2020-04-15 12:36:11 +01:00
Richard Hughes
f23a906cfb synaptics-cxaudio: Wait for the device to reboot after writing firmware
Fixes an error where we get:

    failed to reload device: USB error on device 17ef:a396 : No such device
2020-04-15 12:36:11 +01:00
Mario Limonciello
de60e04481 logitech_hidpp: decrease verbosity of messages that hid++ ID is missing
These are a regression of 9e755e2a5 when devices are asleep.
However due to the current kernel and daemon architecture, logitech devices
are not checked again at any time so if the device isn't awake when
fwupd is started or the unifying dongle is plugged in it won't be present.

This will be changed in the future when the kernel has change events
associated with devices waking up.

Fixes: #1973
2020-04-14 11:26:22 -05:00
Richard Hughes
cf0a7678b8 Allow removing device flags from quirk files
This also means we do the right thing when plugins call fu_device_add_flag()
directly, instead of just from a quirk file.

For instance, now `Flags = ~updatable` is a valid and useful thing to have and
allows us to remove the `Flags = None` hack.
2020-04-13 23:18:19 +01:00
Richard Hughes
fe11927eef Use black to format python source in a consistent manner
No code changes.
2020-04-13 23:06:30 +01:00
Richard Hughes
a8c6c02459 Do not conditionalize attach() and detach() on IS_BOOTLOADER
This is nice in theory, until you need to look at the bootloader status of the
parent, or of a different device entirely. Handle this in plugins for the few
cases we care about and stop setting or clearing IS_BOOTLOADER manually just to
get the vfuncs to be run.

Note: I do not think we want to use cleanup() for attaching devices not in
bootloader states -- as cleanup is only run at the end of the composite update.
2020-04-09 09:55:30 +01:00
Richard Hughes
508fb380d0 wacom-usb: Add more sanity checks in case the daemon goes crazy 2020-04-08 16:30:15 +01:00
Richard Hughes
385b3b29b4 wacom-usb: Use a per-device cleanup function
We never had this when the plugin was created and it makes bluetooth updates
without main firmware updates reboot the device correctly.
2020-04-08 16:30:15 +01:00
Richard Hughes
3fc550e9ed wacom-usb: Add a lot of missing metadata about the devices 2020-04-08 13:55:39 +01:00
Richard Hughes
46eefe72c1 wacom-usb: Hide a lot of debugging behind FWUPD_WACOM_VERBOSE 2020-04-08 13:55:39 +01:00
Richard Hughes
cddf5b5b89 Only auto-add counterpart GUIDs when required
Doing this unconditionally means we accidentally 'bleed' one device mode into
another in a non-obvious way. For instance, a device might have two operating
modes with different GUIDs. If firmware is supplied for both modes in the same
cabinet archive then we might accidentally match the 'wrong' firmware when
the daemon has observed a mode switch and added the counterpart GUIDs.

We only really need the counterpart GUIDs when switching between Jabra, 8bitdo
and DFU devices where the DFU bootloader VID:PID is not manually tagged with
`CounterpartGuid` in a quirk file. In the general case lets keep it simple to
avoid difficult to find bugs.
2020-04-08 13:55:39 +01:00
Ryan Lee
ac58360be7 ccgx: remove update message 2020-04-08 13:27:37 +01:00
Ryan Lee
d3fe478168 ccgx: add parent guid for hybrid dock 2020-04-08 09:09:54 +01:00
Richard Hughes
d38baba712 ccgx: Use a smaller timeout for i2c read and write operations 2020-04-07 19:50:43 +01:00
Richard Hughes
ebaa488b64 ccgx: Retry the register read and write with a i2c reset
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-07 19:50:43 +01:00
Richard Hughes
2e0954f5c9 ccgx: Fix buffer overflow when reading out i2c status
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-07 19:50:43 +01:00
Richard Hughes
1ae10f1016 Revert "ccgx: Reset the i2c bridge on status failure"
This reverts commit 49797d7de4.
2020-04-07 19:50:43 +01:00
Richard Hughes
5a7095dee4 ccgx: Retry the HID disconnect up to 5 times
Based on a patch by  Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-07 19:50:43 +01:00
Richard Hughes
920713245d ccgx: Show a better error message on failure 2020-04-07 12:50:28 -05:00
Richard Hughes
481b01046b ccgx: Allow forcing firmware of the wrong app_type with fwupdtool
If we corrupt the flash, the app_type is 0x0 and we need to force this with a
known-good image to recover the hardware. Ask me how I know.
2020-04-07 18:43:31 +01:00
Ryan Lee
b9fecc4b9c ccgx: Fix critical warning on i2c write failure 2020-04-07 10:47:01 +01:00
Richard Hughes
9e755e2a5c logitech-hidpp: Do not add peripheral devices for receiver in BL mode
This should fix flashing firmware when there are >= 2 receivers plugged in.

Fixes https://github.com/fwupd/fwupd/issues/1951
2020-04-06 14:20:46 -05:00
Richard Hughes
ca03290a12 vli: Only reboot the USB hub once
The cleanup action for the FuVliUsbhubPdDevice is correct, but was not
conditionalized in the composite cleanup, which meant we would reboot twice
for a normal USB hub update.

Move the parent reboot into the right place, although this does mean we might
reboot twice in the rare event of scheduing a FuVliUsbhubPdDevice *and*
FuVliUsbhubDevice update in the same transaction -- but resetting the device
state between updates is arguably correct anyway...
2020-04-02 13:23:40 +01:00
Richard Hughes
2671aaceb2 synaptics-cxaudio: Only use the PATCH2 address when the patch level is 2 2020-04-02 13:23:16 +01:00
Ilya Guterman
257df03f58 add STM32F745 stm dfuse quirk 2020-04-02 13:22:53 +01:00
Richard Hughes
5af1dc69d4 dfu: Add a way to set the timeout from a quirk 2020-04-02 13:22:28 +01:00
Richard Hughes
b951a18fae ccgx: Do not add the HID device that will disconnect 2020-04-01 10:38:50 +01:00
ChangHee (Ryan) Lee
60103e2207 ccgx: Use Silicon ID and Application type to set flash parameters
Also remove unused instance id and fix application type matching as we now get
the image type from the quirk file.
2020-04-01 10:38:50 +01:00
Mario Limonciello
61f74077ed trivial: dfu: drop quirk to hide DW1820A
This can't actually damage the device, it was just showing the wrong flags.
The device is also EOL, so it won't even be seen on most modern machines.
2020-03-31 13:05:57 -05:00