From cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6 Mon Sep 17 00:00:00 2001 From: Andreas Noever Date: Thu, 12 Jun 2014 23:11:46 +0200 Subject: thunderbolt: Read port configuration from eeprom. All Thunderbolt switches (except the root switch) contain a drom which contains information about the device. Right now we only read the UID. Add code to read and parse this drom. For now we are only interested in which ports are disabled and which ports are "dual link ports" (a physical thunderbolt port/socket contains two such ports). Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/thunderbolt/switch.c') diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index c2a24b6fb883..9dfb8e18cdf7 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -400,7 +400,7 @@ struct tb_switch *tb_switch_alloc(struct tb *tb, u64 route) } sw->cap_plug_events = cap; - if (tb_eeprom_read_uid(sw, &sw->uid)) + if (tb_drom_read_uid_only(sw, &sw->uid)) tb_sw_warn(sw, "could not read uid from eeprom\n"); else tb_sw_info(sw, "uid: %#llx\n", sw->uid); @@ -442,7 +442,7 @@ int tb_switch_resume(struct tb_switch *sw) u64 uid; tb_sw_info(sw, "resuming switch\n"); - err = tb_eeprom_read_uid(sw, &uid); + err = tb_drom_read_uid_only(sw, &uid); if (err) { tb_sw_warn(sw, "uid read failed\n"); return err; -- cgit v1.2.1