Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp52919imu; Wed, 21 Nov 2018 15:13:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/XtHYYBBe85CpBxUmBEqWYkBrog++/Wb9VpqOxXqaZHaM9454F44nerMHcrMbHPwFkFoy9h X-Received: by 2002:a63:920a:: with SMTP id o10mr7534048pgd.141.1542842021485; Wed, 21 Nov 2018 15:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542842021; cv=none; d=google.com; s=arc-20160816; b=WHATX3GKfdzV2TigOgUYDdSA1/ZixJ0IMuNjpxqIhggmZNMcwocrA+1crTgFLRTYvp hAL2e+kLNcEqmWnzv/aUyiBwypJmYJyY7LAIQYXk/7vPR91jegUh21Sf6NWOJ2S0yOsi iv1iCcVPKcw2te09HDBGvXqsPOf7Xk6zc5B9GY6sqr/zLT6JOONCBV0WokrSHujfxTCz isWaJLBohZ5iByRSSrD1SRwQbobukGgivsJl/8aN/pfi+78qf0HXCG8ABLR7Ta9dC5ZC CHfugbDrP5+QfymVjds1g0iytQFJj3CkRdckKHVTi6JoNqnfgiWr8YnIz85Ye+Q7bX8a LI7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=onEeoGSxYZyFqPNJpbsyaFJn4evGpNWdxt0epzvgWLI=; b=adGhn58wtGUbqDUpaY13Soyc33xPzWestQhuVb3LO6NJZnTeO7R3rZKVQHwQCfaZtV FT85Xcka2gjJxLLYgWUIohz/M1R3WIHPOs85lJ/WnGoViT9+JfEIiW4+0SmEobMnr0xh KuxtpunlsyWazKOfOGAm/QCNaGs1jTxVgE3twM5S3BB1IHIm+qrTqvmD5+7cCTm/c02E +m5v8oWmfdnfLnQZ+t0BMbmwO/GivkJMvNQbkP+UmqpFGqgPfFIl34IoLuPab3Tcx9sM Oxo7EOKse94U/Xp04A/lcaoK8I0XgHWV4h7AATWX4u6TKAhJHwq8MQdZiiQ+jUJN1hPt Mabg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=prHo6ZXL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si4667996pgt.455.2018.11.21.15.13.22; Wed, 21 Nov 2018 15:13:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=prHo6ZXL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388074AbeKVFnd (ORCPT + 99 others); Thu, 22 Nov 2018 00:43:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:38336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732097AbeKVFnc (ORCPT ); Thu, 22 Nov 2018 00:43:32 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78FAE214DB; Wed, 21 Nov 2018 19:07:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542827279; bh=1iM65JuLjawtSSeCG/+0kQj/YXHmVCWHhaNpqYwj/VA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=prHo6ZXLKBUVS4bJdsf2pjsYwjVXO9u+loSx+8wrPimlVQg+yeSFGucd2RE9GQ91o ijxSnOLEhTwL6DMaFJyIugwjiP+gq6a7iqQjTi7YUXNVeKZ+cBmqkWcQpXvI6GUGGw P51RL3HR/4/MKbWjrliXPwoJ9rYL92+xkJo7Ahlo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Frieder Schrempf , Raghuram Chary J , "David S. Miller" Subject: [PATCH 4.19 41/42] usbnet: smsc95xx: disable carrier check while suspending Date: Wed, 21 Nov 2018 20:06:17 +0100 Message-Id: <20181121183149.739494155@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121183147.869199006@linuxfoundation.org> References: <20181121183147.869199006@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Frieder Schrempf [ 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 Reviewed-by: Raghuram Chary J Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/smsc95xx.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1600,6 +1600,8 @@ static int smsc95xx_suspend(struct usb_i 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; @@ -1842,6 +1844,11 @@ done: */ if (ret && PMSG_IS_AUTO(message)) usbnet_resume(intf); + + if (ret) + schedule_delayed_work(&pdata->carrier_check, + CARRIER_CHECK_DELAY); + return ret; }