summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/switch.c
diff options
context:
space:
mode:
authorAndreas Noever <andreas.noever@gmail.com>2014-06-12 23:11:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 14:14:35 -0700
commitcd22e73bdf5eff7e68a0f8bdfbce123ad43651f6 (patch)
tree0455e24a7e283483f52c5adb4d4e1056bb6c745c /drivers/thunderbolt/switch.c
parent23dd5bb49d986f37977ed80dd2ca65040ead4392 (diff)
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 <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r--drivers/thunderbolt/switch.c4
1 files changed, 2 insertions, 2 deletions
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;