Commit Graph

19 Commits

Author SHA1 Message Date
Richard Hughes
faa7871b08 Remove duplicate ->probe() calls to speed up startup by 150ms
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().

Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.

This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
2022-06-14 21:01:57 +01:00
Richard Hughes
ed1b13da28 Split out the memory helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92 Split out the string helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
182c2c8445 scsi: Allow UFS disks to define the signed status in metadata 2022-06-11 11:06:01 +01:00
Richard Hughes
b3f69c1c47 scsi: Use the SCSI target to correctly set the physical ID
We don't want to include the SCSI LUN in the physical ID, as this is a
logical concept not relating to the hardware device.

Use the UDev devtype to find the 'correct' parent.
2022-06-11 11:06:01 +01:00
Richard Hughes
8a706b470a scsi: Call the ->probe superclass
I don't *think* it's going to add anything remarkable, but it's good to
match the other plugins.
2022-06-08 07:56:45 +01:00
Richard Hughes
79cbdd9395 scsi: Look for platform devices if there is no PCI parent 2022-06-08 07:56:45 +01:00
Richard Hughes
dc91d59f8e Remove the recently added fu_progress_add_step_full()
Just break API instead.
2022-06-03 13:47:11 -05:00
Richard Hughes
0cbcac93cd Rename fu_udev_device_ioctl_full() as we broke ABI 2022-06-03 13:47:11 -05:00
Richard Hughes
8ebad4ea75 Specify an enumerated problem when inhibiting devices
This allows us to make smarter policy decisions in the future on when
to show unavailable updates. It also means we can show translated
text in the frond-end clients.

Only problems the user can "fix" are enumerated. For example, opening
the laptop lid, or charging the device battery.
2022-05-19 13:09:03 -05:00
Richard Hughes
21774cb228 trivial: Remove some dead code in the scsi plugin 2022-05-18 13:19:18 +01:00
Richard Hughes
7d89e85de5 scsi: Support updating firmware on UFS devices
Change-Id: I5573b1890135d1fd3b2f0cb8f95f74cbb3e21abe
2022-05-10 08:20:06 +01:00
Richard Hughes
f0ef6ae05f scsi: Rearchitect the plugin to match a block device
This makes it match the eMMC and SATA plugins, and means we can more easily
walk up to the parent SCSI controller, rather than trying to find the correct
block child.

No functional changes, other than now we also read the disk serial number, and
use one less udev subsystem match.
2022-05-09 07:05:08 +01:00
Mario Limonciello
2677ec48be trivial: scsi: fix a segfault with USB SCSI device plugged in 2022-04-04 13:57:42 -05:00
Richard Hughes
53f75b6ab9 trivial: Fix critical warning when vendor is unset for a SCSI device 2022-03-11 15:25:26 +00:00
Richard Hughes
4080ef637e trivial: Do not show SATA drives as SCSI devices
This fixes a regression in c4ca026294
which meant the 'vendor' sysfs attribute wasn't being stripped before
being used as the vendor ID.
2022-03-11 12:33:23 +00:00
Richard Hughes
c4ca026294 Allow devices to build instance IDs more easily
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.

Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
2022-03-03 09:13:29 +00:00
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
tristate features will automatically disable if dependencies marked
as required are missing.

Packagers can manually override using `auto_features`.

Link: https://mesonbuild.com/Build-options.html#features
2022-02-28 08:34:48 -06:00
Richard Hughes
a3efbe51f6 scsi: Add a simple plugin to enumerate SCSI hardware
We might want this to tag insecure or broken SAS drives, cough.
2022-02-24 17:21:51 +00:00