diff options
author | Andreas Noever <andreas.noever@gmail.com> | 2014-06-12 23:11:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-19 23:14:35 +0200 |
commit | cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6 (patch) | |
tree | 0455e24a7e283483f52c5adb4d4e1056bb6c745c /drivers/thunderbolt/tb.h | |
parent | thunderbolt: Add suspend/hibernate support (diff) | |
download | linux-cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6.tar.xz linux-cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6.zip |
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/tb.h')
-rw-r--r-- | drivers/thunderbolt/tb.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index 63e89d01047c..18ade5e33ae9 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -22,6 +22,7 @@ struct tb_switch { u64 uid; int cap_plug_events; /* offset, zero if not found */ bool is_unplugged; /* unplugged, will go away */ + u8 *drom; }; /** @@ -33,6 +34,9 @@ struct tb_port { struct tb_port *remote; /* remote port, NULL if not connected */ int cap_phy; /* offset, zero if not found */ u8 port; /* port number on switch */ + bool disabled; /* disabled by eeprom */ + struct tb_port *dual_link_port; + u8 link_nr:1; }; /** @@ -237,7 +241,8 @@ int tb_path_activate(struct tb_path *path); void tb_path_deactivate(struct tb_path *path); bool tb_path_is_invalid(struct tb_path *path); -int tb_eeprom_read_uid(struct tb_switch *sw, u64 *uid); +int tb_drom_read(struct tb_switch *sw); +int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid); static inline int tb_route_length(u64 route) |