pci-bcr: Use a plugin prefix for quirk keys

This commit is contained in:
Richard Hughes 2021-03-02 11:00:10 +00:00
parent 2bae97c6c2
commit 24232d1d63
3 changed files with 4 additions and 4 deletions

View File

@ -1,3 +1,3 @@
# Intel Atom Bay Trail [Silvermont]
[DeviceInstanceId=CPUID\PRO_0&FAM_06&MOD_37]
BcrAddr = 0x0
PciBcrAddr = 0x0

View File

@ -249,9 +249,9 @@ fu_cpu_device_set_quirk_kv (FuDevice *device,
const gchar *value,
GError **error)
{
if (g_strcmp0 (key, "BcrAddr") == 0) {
if (g_strcmp0 (key, "PciBcrAddr") == 0) {
guint64 tmp = fu_common_strtoull (value);
fu_device_set_metadata_integer (device, "BcrAddr", tmp);
fu_device_set_metadata_integer (device, "PciBcrAddr", tmp);
return TRUE;
}
g_set_error_literal (error,

View File

@ -44,7 +44,7 @@ fu_plugin_device_registered (FuPlugin *plugin, FuDevice *dev)
{
FuPluginData *priv = fu_plugin_get_data (plugin);
if (g_strcmp0 (fu_device_get_plugin (dev), "cpu") == 0) {
guint tmp = fu_device_get_metadata_integer (dev, "BcrAddr");
guint tmp = fu_device_get_metadata_integer (dev, "PciBcrAddr");
if (tmp != G_MAXUINT && priv->bcr_addr != tmp) {
g_debug ("overriding BCR addr from 0x%02x to 0x%02x",
priv->bcr_addr, tmp);