mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 17:23:20 +00:00
ata: Correct activation functionality
No data is actually exchanged in the activation flow. The commands need to be sent in the direction `SG_DXFER_NONE` to avoid ATA errors.
This commit is contained in:
parent
4bae7a2fa8
commit
3cdd558fe4
@ -474,9 +474,9 @@ fu_ata_device_activate (FuDevice *device, GError **error)
|
||||
struct ata_tf tf = { 0x0 };
|
||||
|
||||
/* flush caches and make sure drive is ready to activate */
|
||||
tf.dev = 0xa0 | ATA_USING_LBA;
|
||||
tf.dev = ATA_USING_LBA;
|
||||
tf.command = ATA_OP_STANDBY_IMMEDIATE;
|
||||
if (!fu_ata_device_command (self, &tf, SG_DXFER_TO_DEV,
|
||||
if (!fu_ata_device_command (self, &tf, SG_DXFER_NONE,
|
||||
120 * 1000, /* a long time! */
|
||||
NULL, 0, error)) {
|
||||
g_prefix_error (error, "failed to standby immediate: ");
|
||||
@ -484,9 +484,10 @@ fu_ata_device_activate (FuDevice *device, GError **error)
|
||||
}
|
||||
|
||||
/* load the new firmware */
|
||||
tf.dev = 0x0a | ATA_USING_LBA;
|
||||
tf.command = ATA_OP_DOWNLOAD_MICROCODE;
|
||||
tf.feat = ATA_SUBCMD_MICROCODE_ACTIVATE;
|
||||
if (!fu_ata_device_command (self, &tf, SG_DXFER_TO_DEV,
|
||||
if (!fu_ata_device_command (self, &tf, SG_DXFER_NONE,
|
||||
120 * 1000, /* a long time! */
|
||||
NULL, 0, error)) {
|
||||
g_prefix_error (error, "failed to activate firmware: ");
|
||||
|
Loading…
Reference in New Issue
Block a user