thunderbolt: Add default linking between lane adapters if not provided by DROM
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 26 Aug 2019 15:19:33 +0000 (18:19 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Sat, 2 Nov 2019 09:13:31 +0000 (12:13 +0300)
commit0d46c08d1ed4f7bb283c7315824f2bfe2c5e0fa9
treea25fc8d476d9366ed724567d0f423445452defeb
parent91c0c12080d0f40ee7275485221b06b4e1e289e1
thunderbolt: Add default linking between lane adapters if not provided by DROM

We currently read how sibling lane adapter ports relate each other from
DROM (Device ROM). If the two lane adapter ports go through the same
physical connector these lanes can then be bonded together. However,
some cases DROM does not provide this information or it is missing
completely (host routers typically do not have DROM). In this case we
have hard-coded the relationship.

Expand this to work with both legacy devices where lane adapter ports 1
and 2, and 3 and 4 are always linked together, and with USB4 devices
where lane adapter 1 is always following lane adapter 0 or is disabled
completely (see USB4 section 5.2.1 for more information).

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