mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-14 23:31:32 +00:00

Some vendors want to ship updates for ATA hardware, but there are currently no lock-down restrictions in place for these kind of devices. There is the OUI from the WWN block which is supposed to identify the vendor, but this is not always set and so we have to be a little creative. We can match 90% of hardware using the vendor name prefix, and the last 10% can be detected with a heuristic that was the result of comparing over 900 drive models. I'm not including very old drive models, media converters, raid controllers, or external 'portable' drives as I don't think it is useful. Also, if the drive contains a Dell vendor block just hardcode this as Dell rather than trying to be clever. Also ask the user to contribute OUI values if this data is found with no quirk data as this is the only real sane way to manage this data long term. The list of OUIs can be found here: http://standards-oui.ieee.org/oui.txt
23 lines
631 B
C
23 lines
631 B
C
/*
|
|
* Copyright (C) 2019 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "fu-plugin.h"
|
|
|
|
#define FU_TYPE_ATA_DEVICE (fu_ata_device_get_type ())
|
|
G_DECLARE_FINAL_TYPE (FuAtaDevice, fu_ata_device, FU, ATA_DEVICE, FuUdevDevice)
|
|
|
|
FuAtaDevice *fu_ata_device_new_from_blob (const guint8 *buf,
|
|
gsize sz,
|
|
GError **error);
|
|
|
|
/* for self tests */
|
|
guint8 fu_ata_device_get_transfer_mode (FuAtaDevice *self);
|
|
guint16 fu_ata_device_get_transfer_blocks (FuAtaDevice *self);
|
|
void fu_ata_device_set_unknown_oui_report (FuAtaDevice *self,
|
|
gboolean enabled);
|