summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/nvm.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2020-06-23 18:14:28 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-07-01 12:51:49 +0200
commit4b794f8066e84818c172c81024f1d61071f14710 (patch)
tree14696637a463aed139720fb4a7b8e98f6c5e911a /drivers/thunderbolt/nvm.c
parentthunderbolt: Ensure left shift of 512 does not overflow a 32 bit int (diff)
downloadlinux-4b794f8066e84818c172c81024f1d61071f14710.tar.xz
linux-4b794f8066e84818c172c81024f1d61071f14710.zip
thunderbolt: Add support for separating the flush to SPI and authenticate
This allows userspace to have a shorter period of time that the device is unusable and to call it at a more convenient time. For example flushing the image may happen while the user is using the machine and authenticating/rebooting may happen while logging out. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/nvm.c')
-rw-r--r--drivers/thunderbolt/nvm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thunderbolt/nvm.c b/drivers/thunderbolt/nvm.c
index 4c6aa06ab3d5..29de6d95c6e7 100644
--- a/drivers/thunderbolt/nvm.c
+++ b/drivers/thunderbolt/nvm.c
@@ -100,6 +100,7 @@ int tb_nvm_write_buf(struct tb_nvm *nvm, unsigned int offset, void *val,
return -ENOMEM;
}
+ nvm->flushed = false;
nvm->buf_data_size = offset + bytes;
memcpy(nvm->buf + offset, val, bytes);
return 0;