thunderbolt: Refactor DROM reading
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 23 Feb 2023 21:07:43 +0000 (15:07 -0600)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 14 Mar 2023 14:15:45 +0000 (16:15 +0200)
commitebde5ba27c640e08e92c83fe30be0d9fa224eea9
tree38103316efac6a1dba1d0514e176716baa836c53
parentc8325b3227508459fab42f4f48fb232bc687f1ba
thunderbolt: Refactor DROM reading

The NVM reading code has a series of gotos that potentially introduce
unexpected behaviors with retries if something unexpected has failed
to parse.

Refactor the code to remove the gotos and drop the retry logic.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[mw: renamed root switch to host router, split device handling too]
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/eeprom.c