fwupd/plugins/nvme
Richard Hughes ff704414f6 Use superclassed versions of FuDevice when calling udev_added() and usb_added()
The daemon creates a baseclass of either FuUsbDevice or FuUdevDevice when the
devices are added or coldplugged to match the quirk database and to find out
what plugin to run.

This is proxied to plugins, but they are given the GUsbDevice or GUdevDevice and
the FuDevice is just thrown away. Most plugins either use a FuUsbDevice or
superclassed version like FuNvmeDevice and so we re-create the FuDevice, re-probe
the hardware, re-query the quirk database and then return this to the daemon.

In some cases, plugins actually probe the hardware three times (!) by creating
a FuUsbDevice to get the quirks, so that the plugin knows what kind of
superclass to create, which then itself probes the hardware again.

Passing the temporary FuDevice to the plugins means that the simplest ones can
just fu_plugin_device_add() the passed in object, or create a superclass and
incorporate the actual GUsbDevice and all the GUIDs.

This breaks internal plugin API but speeds up startup substantially and deletes
a lot of code.
2018-09-04 08:22:39 -05:00
..
tests nvme: Add a new plugin to update NVMe hardware 2018-08-26 19:42:28 +01:00
fu-nvme-device.c Use superclassed versions of FuDevice when calling udev_added() and usb_added() 2018-09-04 08:22:39 -05:00
fu-nvme-device.h Use superclassed versions of FuDevice when calling udev_added() and usb_added() 2018-09-04 08:22:39 -05:00
fu-plugin-nvme.c Use superclassed versions of FuDevice when calling udev_added() and usb_added() 2018-09-04 08:22:39 -05:00
fu-self-test.c nvme: Add a new plugin to update NVMe hardware 2018-08-26 19:42:28 +01:00
meson.build nvme: Add a new plugin to update NVMe hardware 2018-08-26 19:42:28 +01:00
README.md nvme: Add a new plugin to update NVMe hardware 2018-08-26 19:42:28 +01:00

NVMe

Introduction

This plugin adds support for NVMe storage hardware. Devices are enumerated from the Identify Controller data structure and can be updated with appropriate firmware file. Firmware is sent in 4kB chunks and activated on next reboot.

The device GUID is read from the vendor specific area and if not found then generated from the trimmed model string.