diff options
author | Mark Brown <broonie@kernel.org> | 2014-10-20 12:55:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 13:27:32 -0400 |
commit | b7a40242c82cd73cfcea305f23e67d068dd8401a (patch) | |
tree | 251b49d19cd7c371847ae1f951e1b537ca0e1c15 /drivers/thunderbolt/path.c | |
parent | d26833bfce5e56017bea9f1f50838f20e18e7b7e (diff) | |
parent | 9c6de47d53a3ce8df1642ae67823688eb98a190a (diff) |
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts:
drivers/spi/spi-dw-mid.c
Diffstat (limited to 'drivers/thunderbolt/path.c')
-rw-r--r-- | drivers/thunderbolt/path.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index 8fcf8a7b6c22..9562cd026dc0 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c | |||
@@ -150,7 +150,26 @@ int tb_path_activate(struct tb_path *path) | |||
150 | 150 | ||
151 | /* Activate hops. */ | 151 | /* Activate hops. */ |
152 | for (i = path->path_length - 1; i >= 0; i--) { | 152 | for (i = path->path_length - 1; i >= 0; i--) { |
153 | struct tb_regs_hop hop; | 153 | struct tb_regs_hop hop = { 0 }; |
154 | |||
155 | /* | ||
156 | * We do (currently) not tear down paths setup by the firmeware. | ||
157 | * If a firmware device is unplugged and plugged in again then | ||
158 | * it can happen that we reuse some of the hops from the (now | ||
159 | * defunct) firmeware path. This causes the hotplug operation to | ||
160 | * fail (the pci device does not show up). Clearing the hop | ||
161 | * before overwriting it fixes the problem. | ||
162 | * | ||
163 | * Should be removed once we discover and tear down firmeware | ||
164 | * paths. | ||
165 | */ | ||
166 | res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, | ||
167 | 2 * path->hops[i].in_hop_index, 2); | ||
168 | if (res) { | ||
169 | __tb_path_deactivate_hops(path, i); | ||
170 | __tb_path_deallocate_nfc(path, 0); | ||
171 | goto err; | ||
172 | } | ||
154 | 173 | ||
155 | /* dword 0 */ | 174 | /* dword 0 */ |
156 | hop.next_hop = path->hops[i].next_hop_index; | 175 | hop.next_hop = path->hops[i].next_hop_index; |