mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-13 06:27:18 +00:00
emmc: Add back a legacy GUID to fix a regression
I had no idea anyone was using this, so apologies. The instance ID is completely wrong, but it is effectively D-Bus ABI and we need to support old firmware in the field.
This commit is contained in:
parent
1ca3cdd4d9
commit
2c20ade1db
@ -13,12 +13,16 @@ eMMC devices support the `org.jedec.mmc` protocol.
|
|||||||
|
|
||||||
These devices use the following instance values:
|
These devices use the following instance values:
|
||||||
|
|
||||||
* `EMMC\%NAME%`
|
* `EMMC\NAME_%name%`
|
||||||
* `EMMC\%NAME%&%REV%`
|
* `EMMC\NAME_%name%&REV_%rev%`
|
||||||
* `EMMC\%MANFID%&%OEMID%`
|
* `EMMC\MAN_%manfid%&OEM_%oemid%`
|
||||||
* `EMMC\%MANFID%&%OEMID%&%NAME%`
|
* `EMMC\MAN_%manfid%&OEM_%oemid%&NAME_%name%`
|
||||||
* `EMMC\%MANFID%&%NAME%&%REV%`
|
* `EMMC\MAN_%manfid%&NAME_%name%&REV_%rev%`
|
||||||
* `EMMC\%MANFID%&%OEMID%&%NAME%&%REV%`
|
* `EMMC\MAN_%manfid%&OEM_%oemid%&NAME_%name%&REV_%rev%`
|
||||||
|
|
||||||
|
One deprecated instance ID is also added; new firmware should not use this.
|
||||||
|
|
||||||
|
* `EMMC\%manfid%&%oemid%&%name%`
|
||||||
|
|
||||||
## Update Behavior
|
## Update Behavior
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ fu_emmc_device_probe(FuDevice *device, GError **error)
|
|||||||
guint64 manfid = 0;
|
guint64 manfid = 0;
|
||||||
const gchar *tmp;
|
const gchar *tmp;
|
||||||
g_autoptr(GUdevDevice) udev_parent = NULL;
|
g_autoptr(GUdevDevice) udev_parent = NULL;
|
||||||
|
g_autofree gchar *man_oem_name = NULL;
|
||||||
g_autofree gchar *vendor_id = NULL;
|
g_autofree gchar *vendor_id = NULL;
|
||||||
g_autoptr(GRegex) dev_regex = NULL;
|
g_autoptr(GRegex) dev_regex = NULL;
|
||||||
|
|
||||||
@ -221,6 +222,13 @@ fu_emmc_device_probe(FuDevice *device, GError **error)
|
|||||||
fu_device_build_instance_id(device, NULL, "EMMC", "MAN", "NAME", "REV", NULL);
|
fu_device_build_instance_id(device, NULL, "EMMC", "MAN", "NAME", "REV", NULL);
|
||||||
fu_device_build_instance_id(device, NULL, "EMMC", "MAN", "OEM", "NAME", "REV", NULL);
|
fu_device_build_instance_id(device, NULL, "EMMC", "MAN", "OEM", "NAME", "REV", NULL);
|
||||||
|
|
||||||
|
/* this is a (invalid!) instance ID added for legacy compatibility */
|
||||||
|
man_oem_name = g_strdup_printf("EMMC\\%04x&%04x&%s",
|
||||||
|
(guint)manfid,
|
||||||
|
(guint)oemid,
|
||||||
|
fu_device_get_name(device));
|
||||||
|
fu_device_add_instance_id(device, man_oem_name);
|
||||||
|
|
||||||
/* set the vendor */
|
/* set the vendor */
|
||||||
tmp = g_udev_device_get_sysfs_attr(udev_parent, "manfid");
|
tmp = g_udev_device_get_sysfs_attr(udev_parent, "manfid");
|
||||||
vendor_id = g_strdup_printf("EMMC:%s", tmp);
|
vendor_id = g_strdup_printf("EMMC:%s", tmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user