Commit Graph

482 Commits

Author SHA1 Message Date
Mario Limonciello
a66ad15855 Fix UX capsule reference to the one in efivar
The work for this landed in what will turn into efivar 33.

Later down the road when efivar 33 is in most the major distros
this can be removed and a requirement set for efivar 33.
2018-01-12 09:08:18 +00:00
Richard Hughes
80b79bb9aa trivial: Allow plugins to add metadata to the uploaded reports 2018-01-11 21:28:22 +00:00
Richard Hughes
bc3a4e1f57 Store firmware update success and failure to a local database
Rename FuPending to FuHistory to better represent what the object is now doing.
Also, while we're here, switch to using SQLite prepared statements to avoid a
possible invalid read on i386 hardware.
2018-01-11 09:59:34 +00:00
Richard Hughes
b73e70b205 trivial: Use the shared fu_test_compare_lines() in the dfu plugin 2018-01-11 09:59:34 +00:00
Yehezkel Bernat
9157104100 thunderbolt: handle "native" mode
Kernel v4.15 added support for native enumeration of Thunderbolt
topology. The enumeration mode affects both the BIOS and TBT FW
operation so they must agree on it. Platforms may support both modes,
native and "legacy" (or "BIOS-assist").

This change makes sure the new image is compatible with the current
controller mode (otherwise the BIOS and TBT FW will not be alligned on
it at least until next boot) and also adds a new GUID generation logic
for a controller in "native" mode so LVFS could contain 2 images, one for
the "legacy" mode and one for "native".

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2018-01-08 16:28:23 +00:00
Mario Limonciello
3955e6e97d 8bitdo: Add initial SF30/SN30 Pro support (#350)
The SF30/SN30 pro support 4 different modes:
* Switch mode (START + Y)
This looks like a nintendo switch pro controller
* Xinput mode (START + X)
This looks like an XBOX 360 controller
* Dinput mode (START + B)
This looks like a more generic gamepad
* macOS mode (START + A)
This looks like a Sony DS4 controller

3 modes have had a difficult time enumerating in fwupd.
Switch mode:
* failed to add USB device: unexpected device response
Xinput mode:
* failed to add USB device: USB error on device 045e:028e : Pipe error [-9]
macOS mode:
* failed to add USB device: failed to send to device on ep 0x01: USB error on device 054c:05c4 : Input/output error [-1]

The only mode I've gotten a nearly full update flow working is Dinput
so far. After updating the controller comes back in switch mode.
2018-01-08 10:45:55 -05:00
Richard Hughes
516e7741e0 unifying: Fix a compile warning with the latest GLib 2018-01-02 20:37:41 +00:00
Richard Hughes
8a91f4ac1d trivial: Fix a flase-positive-ish harmless warning from Coverity 2017-12-22 14:24:28 +00:00
Richard Hughes
78ee1d0aaa trivial: Fix a with fu-csr-tool bug spotted by Coverity 2017-12-22 14:24:28 +00:00
Elton (Eddie) Hartman
ae538b829a Update README.md
Small typo
2017-12-22 09:04:09 +00:00
Richard Hughes
fe842231d2 unifying: Don't duplicate a device flag from FuDevice 2017-12-14 18:12:13 +00:00
Richard Hughes
d8a175ee90 unifying: Use the daemon replug timeouts 2017-12-14 18:09:04 +00:00
Mario Limonciello
736be7440f dell: block owned TPM updates (#339)
Also make it clearer what the logic is checking.
2017-12-13 12:13:33 -06:00
Richard Hughes
87067cc17d trivial: Add another AIAIAI product to the supported list 2017-12-11 16:53:43 +00:00
Richard Hughes
963cb45793 ebitdo: Use quirks rather than hardcoding a list of VIDs and PIDs
This means we can trivially support new devices in the future without compiling
any new code. This makes it easier to add support for new hardware for LTS
distros like RHEL.
2017-12-11 16:49:28 +00:00
Richard Hughes
d9e6cca414 csr: Add a new plugin to add support for CSR "Driverless DFU"
CSR is short for Cambridge Silicon Radio, which is a the OEM that makes most
of the bluetooth audio chips in vendor hardware. The hardware vendor can enable
or disable features on the CSR microcontroller depending on licensing options.

The hardware vendor can also use a custom USB descriptor, or just set a custom
PID. In the latter case we need to set the vendor and model to reality using
quirks.

This commit allows the user to update the firmware in the AIAIAI H05 wireless
headphones.
2017-12-11 10:47:18 +00:00
Richard Hughes
5060246526 trivial: Move the USB quirks from FuPlugin to FuUsbDevice
Also rename some general USB quirks that are not specific to any one plugin.
2017-12-11 10:47:18 +00:00
Richard Hughes
a29711c4a1 Move the FuQuirks reference down from DfuDevice to FuDevice 2017-12-11 10:47:18 +00:00
Richard Hughes
66268d0b31 unifying: Fix the string output format to match FuDevice 2017-12-10 14:50:58 +00:00
Richard Hughes
ae252cd83c trivial: Add some common functionality from reading and writing to a buffer 2017-12-08 20:07:09 +00:00
Richard Hughes
168b9faa80 Make LuDevice derive from FuDevice
This removes a lot of duplicated code.
2017-12-08 09:36:57 +00:00
Richard Hughes
024cc230ed Add fu_device_set_progress_full()
This allows the plugin to use the raw byte values as a progress counter without
first converting to a percentage.
2017-12-08 09:36:57 +00:00
Richard Hughes
99f33c7414 Move some common code down into LuDeviceBootloader
This is common API shared by the nordic and texas bootloaders.
2017-12-05 16:11:50 +00:00
Richard Hughes
7be4f138f3 trivial: Remove an unused Unifying vfunc 2017-12-05 14:36:48 +00:00
Richard Hughes
e755d6bb05 Add a more general quirk for adding GUIDs to devices
This replaces fwupd-dfu-alternate-vidpid which was only useful in the DFU plugin
and somewhat poorly defined.
2017-12-04 17:00:22 +00:00
Richard Hughes
524343ac63 trivial: Remove DfuMode
We can get all this information just from looking at the device state.
2017-12-04 17:00:22 +00:00
Richard Hughes
23135eb1c9 trivial: Remove the now-unused fu_plugin_set_status() 2017-12-04 17:00:22 +00:00
Richard Hughes
a2fff1f44e dfu: Remove DfuContext
Use the power of FuUsbDevice in DfuDevice to remove a lot of complicated code.
2017-12-04 17:00:22 +00:00
Richard Hughes
831bea1024 trivial: Manually call the initial DFU refresh to simplify the DfuDevice code 2017-12-04 17:00:22 +00:00
Richard Hughes
92ced1cfbf trivial: Move the detach and attach to the DFU client tool
This isn't used by the daemon and makes the DfuDevice client simpler.
2017-12-04 17:00:22 +00:00
Richard Hughes
01d152e2ef trivial: Make DfuDevice derive from GUsbDevice 2017-12-04 17:00:22 +00:00
Richard Hughes
1a16cc5e41 trivial: Remove the use of GCancellable in the dfu plugin
We're not using this, and we can simplify the code considerably now that the
library is not installed for external users.
2017-12-04 17:00:22 +00:00
Mario Limonciello
eb737f15f5 fix CI builds with -Werror
Switching to build in -werror in 4016c839a8
was not working properly.  Adjust the CI builds to use --werror instead.

Also while doing this, enable -werror in clang builds.
2017-11-30 16:42:26 -06:00
Richard Hughes
4a833f2dd2 trivial: Create the right kind of device in the steelseries plugin 2017-11-30 21:26:39 +00:00
Richard Hughes
4a036018f7 Set the progress and state on the FuDevice, not the FuPlugin
This makes more sense; we're updating the device, not the plugin itself.

This also means we don't need to funnel everything through callbacks like
GFileProgressCallback and we can also update the state without adding an
explicit callback to each derived device type.
2017-11-30 20:51:52 +00:00
Richard Hughes
e3bc2bcf88 steelseries: Use the new ->probe vfunc
Also, fix a silly typo found using Coverity.
2017-11-30 16:50:54 +00:00
Richard Hughes
bde01d5240 nitrokey: Use the new ->probe vfunc 2017-11-30 14:16:34 +00:00
Richard Hughes
9c1cc979ff ebitdo: Use the new ->probe vfunc 2017-11-30 14:16:34 +00:00
Richard Hughes
af5743101f colorhug: Use the new ->probe vfunc 2017-11-30 14:16:34 +00:00
Philip Withnall
8e2ca90509 udev: Fix a double-free bug
That GUdev function returns a const gchar*, not an allocated pointer, so
don’t try to autofree it. This would have caused a crash (I only
observed it as a compiler warning with
-Wincompatible-pointer-types-discards-qualifiers).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Philip Withnall
a68a050f39 plugins: Remove various unused variables
Fix some compiler warnings to reduce the build noise.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-30 13:44:41 +00:00
Richard Hughes
2e9df07dc5 trivial: Remove the DFU-specific hardware tests
We have end-to-end installed tests using the daemon now.
2017-11-29 16:00:25 +00:00
Richard Hughes
245543849f unifying: Move the coldplug to the correct startup phase 2017-11-27 18:07:53 +00:00
Richard Hughes
061278b9ca amt: Move the coldplug to the correct startup phase 2017-11-27 18:07:53 +00:00
Richard Hughes
d0cff7caec Remove autoconf-isms from the meson configure options
See https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
2017-11-27 18:07:53 +00:00
Richard Hughes
3c1f326580 trivial: Remove dead code 2017-11-27 18:07:53 +00:00
Richard Hughes
43179f2887 steelseries: Release the interface if getting the version failed 2017-11-27 18:07:53 +00:00
Richard Hughes
8b15bd1223 usb: Get the descriptor GUID and version in FuUsbDevice 2017-11-27 18:07:53 +00:00
Richard Hughes
fda44315e6 Remove the USB fallback plugin
Nobody complained when this was turned off, and it isn't really useful.
2017-11-27 18:07:53 +00:00
Richard Hughes
46e993d03e trivial: Fix a warning from clang 2017-11-27 18:07:53 +00:00