From: Mika Westerberg Date: Mon, 28 Dec 2020 10:47:02 +0000 (+0200) Subject: thunderbolt: Check quirks in tb_switch_add() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e23a5afd013c15909169c56751f8d7dac67a68eb;p=linux.git thunderbolt: Check quirks in tb_switch_add() This makes it more visible on the main path of adding router. Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index dd03d30966531..aecb0b9f0c752 100644 --- a/drivers/thunderbolt/eeprom.c +++ b/drivers/thunderbolt/eeprom.c @@ -610,7 +610,6 @@ parse: sw->uid = header->uid; sw->vendor = header->vendor_id; sw->device = header->model_id; - tb_check_quirks(sw); crc = tb_crc32(sw->drom + TB_DROM_DATA_START, header->data_len); if (crc != header->data_crc32) { diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 71473fbb94939..321a5bcfce65b 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2522,6 +2522,8 @@ int tb_switch_add(struct tb_switch *sw) } tb_sw_dbg(sw, "uid: %#llx\n", sw->uid); + tb_check_quirks(sw); + ret = tb_switch_set_uuid(sw); if (ret) { dev_err(&sw->dev, "failed to set UUID\n");