Skip to content

Commit

Permalink
net: thunderbolt: Tear down connection properly on suspend
Browse files Browse the repository at this point in the history
When suspending to mem or disk the Thunderbolt controller typically goes
down as well tearing down the connection automatically. However, when
suspend to idle is used this does not happen so we need to make sure the
connection is properly disconnected before it can be re-established
during resume.

Fixes: e69b6c0 ("net: Add support for networking over Thunderbolt cable")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mika Westerberg authored and David S. Miller committed Feb 12, 2018
1 parent b4580c9 commit 8e021a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/thunderbolt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,10 +1270,7 @@ static int __maybe_unused tbnet_suspend(struct device *dev)
stop_login(net);
if (netif_running(net->dev)) {
netif_device_detach(net->dev);
tb_ring_stop(net->rx_ring.ring);
tb_ring_stop(net->tx_ring.ring);
tbnet_free_buffers(&net->rx_ring);
tbnet_free_buffers(&net->tx_ring);
tbnet_tear_down(net, true);
}

return 0;
Expand Down

0 comments on commit 8e021a1

Please sign in to comment.