]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thunderbolt: Read router NVM version before applying quirks
authorRene Sapiens <rene.sapiens@linux.intel.com>
Sat, 7 Feb 2026 00:25:56 +0000 (16:25 -0800)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 2 Mar 2026 06:51:58 +0000 (07:51 +0100)
commit4573add760b8dd52a215fd134effb76da10ebcf5
tree5a6d2ed90a680aa143a4ad4389212316d49ff9ba
parent11439c4635edd669ae435eec308f4ab8a0804808
thunderbolt: Read router NVM version before applying quirks

The router NVM version is currently only available after the NVMem devices
have been registered. This is too late for firmware-dependent quirks that
are evaluated during tb_switch_add() before device registration.

Split router NVM handling into two phases:
  - tb_switch_nvm_init() allocates the NVM object and reads the version
  - tb_switch_nvm_add() registers the NVMem devices using the pre-read NVM

This makes the NVM major/minor version available before tb_check_quirks()
without changing when the NVMem devices are registered.

Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c