mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 06:49:52 +00:00
thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
This is only used to write a new NVM in order to upgrade the retimer firmware. It does not make sense to expose it if upgrade is disabled. This also makes it consistent with the router NVM upgrade. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
parent
75749d2c1d
commit
ad79c278e4
@ -93,9 +93,11 @@ static int tb_retimer_nvm_add(struct tb_retimer *rt)
|
||||
if (ret)
|
||||
goto err_nvm;
|
||||
|
||||
ret = tb_nvm_add_non_active(nvm, nvm_write);
|
||||
if (ret)
|
||||
goto err_nvm;
|
||||
if (!rt->no_nvm_upgrade) {
|
||||
ret = tb_nvm_add_non_active(nvm, nvm_write);
|
||||
if (ret)
|
||||
goto err_nvm;
|
||||
}
|
||||
|
||||
rt->nvm = nvm;
|
||||
dev_dbg(&rt->dev, "NVM version %x.%x\n", nvm->major, nvm->minor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user