Skip to content

Fix problems fetching TBT3 DROM from AMD USB4 routers

Mario Limonciello linux-usb lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v33 patches 2 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches4 repliesSuperseded

Changes in v4 from the cover letter

* Style fixups
* Fixup for wrong path for USB4 devices

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3thunderbolt: Adjust how NVM reading worksdrivers/thunderbolt/eeprom.c+5 -00 replies
2/3thunderbolt: use `tb_eeprom_get_drom_offset` to discover DROM offsetdrivers/thunderbolt/eeprom.c+2 -30 replies
3/3thunderbolt: Refactor DROM readingdrivers/thunderbolt/eeprom.c+120 -990 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] Fix problems fetching TBT3 DROM from AMD USB4 routers

TBT3 devices when connected to an AMD USB4 router occasionally fail to properly respond to requests for the DROM via bit banging.

Depending upon which part of the request failed will impact the severity. A number of workarounds have been put in place to let the driver handle the failed requests:

commit e87491a9fd4e3 ("thunderbolt: Retry DROM reads for more failure scenarios") commit a283de3ec646f ("thunderbolt: Do not resume routers if UID is not set") commit 6915812bbd109 ("thunderbolt: Do not make DROM read success compulsory") commit f022ff7bf377 ("thunderbolt: Retry DROM read once if parsing fails")

Still even with these changes the failures do make it through. In comparing other CM implementations utilized on AMD systems, they all access the DROM directly from the NVM.

To avoid triggering this issue, try to get the DROM directly from the NVM in Linux as well when devices have an LC.

v4:
* Style fixups
* Fixup for wrong path for USB4 devices

Mario Limonciello (3):
thunderbolt: Adjust how NVM reading works
thunderbolt: use tb_eeprom_get_drom_offset to discover DROM offset
thunderbolt: Refactor DROM reading

 drivers/thunderbolt/eeprom.c | 219 +++++++++++++++++++----------------
 1 file changed, 122 insertions(+), 97 deletions(-)
Signature · 1 line
2.34.1