From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: Michael Jamet <michael.jamet@intel.com>,
Yehezkel Bernat <yehezkel.bernat@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
netdev@vger.kernel.org
Subject: [PATCH net 1/2] net: thunderbolt: Tear down connection properly on suspend
Date: Mon, 12 Feb 2018 17:10:19 +0300 [thread overview]
Message-ID: <20180212141020.78136-1-mika.westerberg@linux.intel.com> (raw)
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: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org
---
drivers/net/thunderbolt.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/thunderbolt.c b/drivers/net/thunderbolt.c
index ca5e375de27c..71cf9ab72fbc 100644
--- a/drivers/net/thunderbolt.c
+++ b/drivers/net/thunderbolt.c
@@ -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;
--
2.15.1
next reply other threads:[~2018-02-12 14:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 14:10 Mika Westerberg [this message]
2018-02-12 14:10 ` [PATCH net 2/2] net: thunderbolt: Run disconnect flow asynchronously when logout is received Mika Westerberg
2018-02-12 17:03 ` David Miller
2018-02-12 17:03 ` [PATCH net 1/2] net: thunderbolt: Tear down connection properly on suspend David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212141020.78136-1-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=davem@davemloft.net \
--cc=michael.jamet@intel.com \
--cc=netdev@vger.kernel.org \
--cc=yehezkel.bernat@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).