diff options
author | Szuying Chen <Chloe_Chen@asmedia.com.tw> | 2022-09-02 17:40:09 +0800 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-09-07 09:06:50 +0300 |
commit | 5424e1bf16f96bd681c780f5fd12e33588c7ade3 (patch) | |
tree | 04f672c3c52001e3fb013d19335d4a7bc2ed4c09 /drivers/thunderbolt/switch.c | |
parent | 5172eb9a16437af35f86ab66c8e6b55cc9a9cf78 (diff) | |
download | linux-stable-5424e1bf16f96bd681c780f5fd12e33588c7ade3.tar.gz linux-stable-5424e1bf16f96bd681c780f5fd12e33588c7ade3.tar.bz2 linux-stable-5424e1bf16f96bd681c780f5fd12e33588c7ade3.zip |
thunderbolt: Extend NVM version fields to 32-bits
In order to support non-Intel NVM image formats extend the NVM major and
minor version to 32-bits to better accommondate different versioning
schemes.
No functional impact.
Signed-off-by: Szuying Chen <Chloe_Chen@asmedia.com.tw>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index bd815e2cc6ec..ac8d7145e9ff 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -427,8 +427,8 @@ static int tb_switch_nvm_add(struct tb_switch *sw) if (ret) goto err_nvm; - nvm->major = val >> 16; - nvm->minor = val >> 8; + nvm->major = (val >> 16) & 0xff; + nvm->minor = (val >> 8) & 0xff; ret = tb_nvm_add_active(nvm, nvm_size, tb_switch_nvm_read); if (ret) |