summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/tb.h
diff options
context:
space:
mode:
authorAndreas Noever <andreas.noever@gmail.com>2014-06-03 22:04:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 23:13:00 +0200
commitc90553b3c4ac2389a71a5c012b6e5bb1160d48a7 (patch)
treea4374e06d030654c1dd1f076417908f2536824f4 /drivers/thunderbolt/tb.h
parentPCI: Suspend/resume quirks for Apple thunderbolt (diff)
downloadlinux-c90553b3c4ac2389a71a5c012b6e5bb1160d48a7.tar.xz
linux-c90553b3c4ac2389a71a5c012b6e5bb1160d48a7.zip
thunderbolt: Read switch uid from EEPROM
Add eeprom access code and read the uid during switch initialization. The UID will be used to check device identity after suspend. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 508abc426563..a89087f2da71 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -19,6 +19,7 @@ struct tb_switch {
struct tb_regs_switch_header config;
struct tb_port *ports;
struct tb *tb;
+ u64 uid;
int cap_plug_events; /* offset, zero if not found */
bool is_unplugged; /* unplugged, will go away */
};
@@ -231,6 +232,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);
+
static inline int tb_route_length(u64 route)
{