Commit Graph

39 Commits

Author SHA1 Message Date
Érico Rolim
0651aeef24 Fix header names.
- <sys/poll.h> should be <poll.h>
- <sys/errno.h> should be <errno.h>
2020-10-10 12:33:56 +01:00
Richard Hughes
496fb826f1 trivial: Add fu_udev_device_get_number() 2020-09-26 12:20:41 +01:00
Richard Hughes
f02571b3f3 Use the 'real' hardware class for virtual classes like net 2020-09-25 13:25:52 +01:00
Richard Hughes
de9be2d34c trivial: Correctly set subsystem when using _VENDOR_FROM_PARENT 2020-09-25 13:25:52 +01:00
Richard Hughes
6b5926ca59 trivial: Fix two warnings in the win32 build 2020-09-24 09:19:15 +01:00
Richard Hughes
34f7d9d8fb Allow binding and unbinding kernel drivers 2020-09-21 20:07:54 +01:00
Richard Hughes
b9ef4399c9 Remove unused udev rules
We used these before we had the quirk files, and now with all the VLI devices
supported in the quirk files these entries do nothing at all.
2020-09-20 19:11:44 +01:00
Richard Hughes
0038b4a780 Allow plugins to match using the SUBSYS IDs
This is the same format specified by Microsoft in "Identifiers for PCI Devices"
https://docs.microsoft.com/en-us/windows-hardware/drivers/install/identifiers-for-pci-devices
2020-09-17 15:25:26 +01:00
Richard Hughes
ad32b0c17e elaptp: Allow recovery when the HID firmware fails to load 2020-09-14 16:19:45 +01:00
Richard Hughes
a06a480904 trivial: Allow using fu_udev_device_pread_full() at offset zero
Do not enforce the port is nonzero when reading and writing to a device.
2020-09-14 16:19:45 +01:00
Mario Limonciello
6d0c4897e1 fu-udev-device: call rescan on the device for change events
This allows calling the correct method, and instead doesn't have
all the plugins try to process the event when they're missing
vfuncs
2020-09-11 13:15:51 -05:00
Richard Hughes
9a07407401 Use the FuUdevDevice ->to_string() output
Print the sysfs path for devices deriving from FuUdevDevice, which also allows
us to use FU_UDEV_DEVICE_DEBUG without monkey-patching the plugins that also
define a device_class->to_string() vfunc.
2020-09-03 16:50:41 +01:00
Richard Hughes
ecb4d1416d trivial: Only use FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT as a fallback
If the device node actually provides a vendor string, always use that before
falling back. The flag was initially designed to fall back in the event the NVMe
device does not declare a valid sysfs vendor ID.
2020-09-03 16:50:41 +01:00
Richard Hughes
82f9a85201 Fall back from ID_VENDOR_FROM_DATABASE to ID_VENDOR for NVMe devices 2020-09-03 16:50:41 +01:00
Richard Hughes
241bdbb0f5 trivial: Fix some dead code as-seen by Coverity 2020-09-01 14:12:27 +01:00
Richard Hughes
b81140de75 libfwupdplugin: Fix some NULL/FALSE confusion 2020-08-17 14:47:17 +01:00
Richard Hughes
8edaa89076 libfwupdplugin: Allow opening i2c devices with O_NONBLOCK 2020-07-28 14:19:24 +01:00
Richard Hughes
070084e0d8 libfwupdplugin: Set the physical device ID for i2c devices 2020-07-28 14:19:24 +01:00
Mario Limonciello
a2431e07ff trivial: fu-udev-device: add support for exporting the udev device type
This is useful in some plugins that will behave differently for
multiple device types.
2020-07-03 12:56:44 -05:00
Mario Limonciello
89a11acdaa trivial: update various symbols to 1.4.5
See https://github.com/fwupd/fwupd/pull/2235 for details
2020-06-30 11:52:26 -05:00
Mario Limonciello
412e170b26 trivial: libfwupdplugin: add a new method to write strings to sysfs files 2020-06-22 16:09:10 -05:00
Richard Hughes
5bb537c214 libfwupdplugin: Fix trivial memory leak when using fu_udev_device_incorporate()
This also adds two missing property notify events.
2020-06-22 15:55:02 +01:00
Richard Hughes
bdfccdf097 Allow multi-byte FuUdevDevice preads and writes 2020-05-29 17:34:18 +01:00
Mario Limonciello
e36d3e3faa trivial: fu-udev-device: create another instance ID for the driver 2020-05-19 09:05:52 -05:00
Richard Hughes
f6b48edebf pci-bcr: Read the ISA bridge BCR from the PCI device class
The SPI controllers are always identified with one of two device classes.
2020-05-18 21:16:59 -05:00
Richard Hughes
63fa4effd3 pci-mei: Check the ME device is not in manufacturing mode 2020-05-15 21:28:27 -05:00
Richard Hughes
748a65f3c7 trivial: Post branch version bump
We're planning to ship fwupd 1.4.x in RHEL 8 and so it makes sense to have a
stable branch to do point releases. I don't intend to release versions 1.5.x
any time soon, so moderately-agressive backporting to 1_4_X is okay.
2020-05-05 11:34:17 +01:00
Mario Limonciello
0d207d8dea fu-udev-device: add fu_udev_device_get_parent_name
This will fetch the name from parent device
2020-04-29 13:15:45 -05:00
Mario Limonciello
224b685fae fu-udev-device: Add support for reading arbitrary sysfs attributes
Some devices provide 'non-standard' attributes that are relevant
for use.
2020-04-29 13:15:45 -05:00
Richard Hughes
f50ff2c27e Decouple the version format from the version itself
If we say that the version format should be the same for the `version_lowest`
and the `version_bootloader` then it does not always make sense to set it at
the same time.

Moving the `version_format` to a standalone first-class property also means it
can be typically be set in the custom device `_init()` function, which means we
don't need to worry about *changing* ther version format as set by the USB and
UDev superclass helpers.
2020-02-25 14:00:09 +00:00
Richard Hughes
234ee64509 Allow specifying a list of subsystems when setting a physical ID
Sometimes we want to fall back to a different subsystem entirely.
2020-02-12 17:15:28 +00:00
Richard Hughes
390fc1ad28 trivial: Get the physical ID for the drm_dp_aux_dev subsystem too 2020-02-12 17:15:28 +00:00
Richard Hughes
08fd6e9179 trivial: Include the device subsubsystem in the physical ID error message
We check for this, so it makes sense to show it in the list of possibilities.
2020-02-11 11:19:14 +00:00
Richard Hughes
63b9ac8844 Don't always get the vendor ID for udev devices using the parent
Fixes bugs like https://github.com/fwupd/fwupd/issues/1673
2020-01-06 14:48:58 +00:00
Richard Hughes
fbb677bee2 Add a new plugin that exposes the system TPM device firmware version
This plugin does not yet allow the device to be upgraded, and is provided for
information only.
2019-12-05 21:05:17 +00:00
Richard Hughes
6c924a69c4 Add fu_udev_device_set_flags()
This allows us to specify with more detail how the device is opened.
2019-12-05 14:08:48 -06:00
Richard Hughes
5ef1862cc5 Add the sysfs 'description' as the one-line device summary 2019-12-04 15:27:09 +00:00
Richard Hughes
3d48c1bbbc trivial: Also print the parent keys when using FU_UDEV_DEVICE_DEBUG 2019-12-04 15:27:09 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00