Commit Graph

33 Commits

Author SHA1 Message Date
Mario Limonciello
e6cda81f8d synapticsmst: Drop the dependency on Dell plugin to populate devices
If the dock information is available then show that in the device name
and restrict the GUIDs created.

If it's not available, then just create GUIDs for all known docks
2018-07-19 11:09:05 -05:00
Richard Hughes
d3f2878f19 synapticsmst: Fix several small memory leaks during enumeration 2018-06-28 18:16:24 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Mario Limonciello
1a60231658 trivial: synapticsmst: Recognize boardid 0x103
This board_id will be used in a new device in the future.
The enum and description will be updated later when more details
are ready.
2018-05-03 14:07:42 -05:00
Sjoerd Simons
2bc6d0a38a synapticsmst: Improve error reporting
Rather then always assuming open() fails because of permission denied,
generate the GError code from the errno and add the related strerror to
the message. And ofcourse output the error message in debugging rather
then just ignoring it.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-12 20:31:30 -05:00
Sjoerd Simons
9b0d1d4ca4 synapticsmst: Only enumerate Dell Docks if the type is known
The type of Dell dock gets used in the device GUID, so make that
mandatory for device enumeration to succeed. Only relying on the
synapticsmst plugin to be cold plugged after the dell plugin isn't
enough to ensure this.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-10 15:57:59 -05:00
Sjoerd Simons
6761896b33 synapticsmst: Disable remote control on failure
When hitting a failure during enumerating make sure remote control mode
is disabled again.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-10 15:57:59 -05:00
Mario Limonciello
7af941fee4 synaptics: drop hard dependency on dell plugin and libsmbios
Rather than have a hard dependency use metadata and internal DMI
to communicate the relevant details
2017-10-18 08:27:38 -05:00
Richard Hughes
d82a6024e7 Fix a crash when enumerating devices on a Dell WLD15 2017-02-13 11:03:03 +00:00
Richard Hughes
6d5f2dc25e trivial: Fix compile warnings when building packages 2017-02-13 10:50:07 +00:00
Richard Hughes
3e214856fb trivial: Fix a resource leak spotted by coverity 2017-02-08 11:03:48 +00:00
Mario Limonciello
8971645f78 trivial: synapticsmst: don't bother to scan cascade nodes in test suite
This significantly speeds up the test suite.

They can't really be easily represented anyways in the test suite
since the devnode would have to change so much between steps.
2017-02-03 13:21:29 -06:00
Mario Limonciello
0a65ffb239 synapticsmst: add a test suite 2017-02-02 21:43:42 -06:00
Mario Limonciello
e41e4a7a26 trivial: synaptics: encode chip ID into dock string
Although the same payload is used for all 3 MST hubs in TB16 or WD15
it's possible this may change one day.  Create separate GUID's for
all 3 different combinations by encoding the chip ID into the GUID
string.
2017-02-01 16:43:57 -06:00
Mario Limonciello
8d97bcf0ed trivial: synaptics: keep system ID in hexadecimal 2017-02-01 14:04:44 -06:00
Mario Limonciello
8d51d273e7 trivial: synapticsmst: consistently use lower case for dock ID's 2017-02-01 13:25:54 -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
ceb0ea9582 trivial: synaptics: don't advertise device remote control out to the plugin or tool 2017-01-20 16:26:56 -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
836ff015b3 trivial: synaptics: on new systems show unknown rather than failing 2017-01-17 16:08:04 -06:00
Mario Limonciello
548c6901c4 trivial: synaptics: add missing ID string for Rugged platforms 2017-01-17 12:13:59 -06:00
Richard Hughes
2153cd0f89 trivial: Use guint8 rather than guchar
Although it's probably the same, this matches the other plugins.
2017-01-17 14:10:12 +00:00
Richard Hughes
26aade02d2 trivial: Don't use caps in variable names 2017-01-17 13:21:14 +00:00
Pei-Chen Huang
9225270421 trivial: fix synaptics device scan cascade function 2017-01-17 06:23:45 -06:00
Richard Hughes
3d8d48c896 trivial: Remove boilerplate gtk-doc from plugin 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
Richard Hughes
94ce14f317 trivial: Use rc for return codes
The variable ret is normally reserved for boolean values.
2017-01-17 08:58:40 +00:00
Richard Hughes
1967c6c9ac trivial: Fix up some missing return value assignments
Spotted by coverity.
2017-01-17 08:54:34 +00: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