Commit Graph

29 Commits

Author SHA1 Message Date
Richard Hughes
5720fc9d90 trivial: Add more vendor information to devices 2017-09-11 10:11:34 +01: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
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
Mario Limonciello
99489a8638 trivial: set synaptics error message in more scenarios 2017-03-20 13:34:26 -05: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
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
43f2286e10 trivial: synaptics: update the device name to be more sensible 2017-02-01 16:43:50 -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
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
8c7b98da56 synapticsmst: Iterate all nodes rather than hardcoding to 3 2017-01-26 17:06:22 -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
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
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
d99282f2ca trivial: Fix an anti-pattern when returning error strings 2017-01-19 08:43:06 +00:00
Mario Limonciello
0ed79d5455 trivial: synaptics: log invalid board IDs 2017-01-17 12:02:15 -06:00
Richard Hughes
26aade02d2 trivial: Don't use caps in variable names 2017-01-17 13:21:14 +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
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