From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 04/13] usbnet: smsc95xx: disable carrier check while suspending
Date: Wed, 14 Nov 2018 17:25:45 -0500 [thread overview]
Message-ID: <20181114222558.100213-4-sashal@kernel.org> (raw)
In-Reply-To: <20181114222558.100213-1-sashal@kernel.org>
From: Frieder Schrempf <frieder.schrempf@kontron.de>
[ Upstream commit 7b900ead6cc66b2ee873cb042dfba169aa68b56c ]
We need to make sure, that the carrier check polling is disabled
while suspending. Otherwise we can end up with usbnet_read_cmd()
being issued when only usbnet_read_cmd_nopm() is allowed. If this
happens, read operations lock up.
Fixes: d69d169493 ("usbnet: smsc95xx: fix link detection for disabled autonegotiation")
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Raghuram Chary J <RaghuramChary.Jallipalli@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/smsc95xx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index a167116ceeee..e29f4c0767eb 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1590,6 +1590,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
return ret;
}
+ cancel_delayed_work_sync(&pdata->carrier_check);
+
if (pdata->suspend_flags) {
netdev_warn(dev->net, "error during last resume\n");
pdata->suspend_flags = 0;
@@ -1832,6 +1834,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
*/
if (ret && PMSG_IS_AUTO(message))
usbnet_resume(intf);
+
+ if (ret)
+ schedule_delayed_work(&pdata->carrier_check,
+ CARRIER_CHECK_DELAY);
+
return ret;
}
--
2.17.1
next prev parent reply other threads:[~2018-11-14 22:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 22:25 [PATCH AUTOSEL 4.9 01/13] s390/vdso: add missing FORCE to build targets Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 02/13] netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 03/13] s390/mm: Fix ERROR: "__node_distance" undefined! Sasha Levin
2018-11-14 22:25 ` Sasha Levin [this message]
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 05/13] netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 06/13] netfilter: xt_IDLETIMER: add sysfs filename checking routine Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 07/13] s390/qeth: fix HiperSockets sniffer Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 08/13] hwmon: (ibmpowernv) Remove bogus __init annotations Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 09/13] clk: fixed-factor: fix of_node_get-put imbalance Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 10/13] lib/raid6: Fix arm64 test build Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 11/13] i2c: omap: Enable for ARCH_K3 Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 12/13] qed: Fix memory/entry leak in qed_init_sp_request() Sasha Levin
2018-11-14 22:25 ` [PATCH AUTOSEL 4.9 13/13] qed: Fix blocking/unlimited SPQ entries leak Sasha Levin
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=20181114222558.100213-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=frieder.schrempf@kontron.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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).