Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3435674imu; Sun, 11 Nov 2018 15:03:29 -0800 (PST) X-Google-Smtp-Source: AJdET5d64hvHXzzBTfP0J5LkbtVYJxm3rFz2NqqAIC0azz9p3qyOxG6lzHZZw+XSbudkh8Hmu3n2 X-Received: by 2002:a62:5793:: with SMTP id i19-v6mr18358744pfj.158.1541977409395; Sun, 11 Nov 2018 15:03:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977409; cv=none; d=google.com; s=arc-20160816; b=B4E7AAUyDwLPan5CMt1747e02N4P8QJ8sZauLuF0zNc7K38esrW56WVDBrEbcERgpZ pyyq2hQytWLxyw1a+yU7kxZuSijRLqXtaxP8l3KMekrrrGluJ0LN9RGbKb7Px3dkprXM C61XlbjCHx6utvGZ9DmOYqg0jS+2sirX+OeuXkpjGh1oWTLjIn0pxkNJ+FFi6QTm/lMx vjX7l4HiXvAVGnIITBXEPDb9t+8fS4VvTJZKGRLjzmrhYnslBYQHSKmvNy7fUinNv6L+ GAlqww5zyjpYfp6+P25XoXNIwa1lECCEjrrkR3/F5IrFqxCoLTgfVupXLbXLBbGkKK4d Lk1A== 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=FmPR3LNfs2yhKCL9CkQ/6JvUcfHXunGbbhbDEuUBIlU=; b=tkdMHGMBAbtPmGM+tYKG7olHbZrYGX76rRbAsJeFReTixQ3D/MZC6/XJwHPZFRlNnv Rf0/4XDjiDuI97MKVJGHiRWMpOfBT5JiSfRRicTyW+7tDi2jHPXhwraYFbY5vq32Me0T AKfrzEqxw9FdIO7IYDARu+zJQgiL7g4qy6KTJ0UV8yUWWvzzLe/0Ii67SJGUGkkn6wss UnJAc+eflAfOUXP+ePB9CQ0MMXzLv2Z335jpJAABEMfV6yUNRqsLY1+UA5B7xHJ2yelE KGye9xpiViHd0GSNT5csIKLCS4dR4XkW7b/BIpoo6xVlBg1cR6EgYRY4G1rMUqTjvNMs NQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q0aWkVjQ; 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 cc8-v6si17859366plb.377.2018.11.11.15.03.14; Sun, 11 Nov 2018 15:03:29 -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=Q0aWkVjQ; 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 S2390597AbeKLIW0 (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:51836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390563AbeKLIWY (ORCPT ); Mon, 12 Nov 2018 03:22:24 -0500 Received: from localhost (unknown [206.108.79.134]) (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 5DD2D224B3; Sun, 11 Nov 2018 22:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975547; bh=zUNBx5xnTgCQXxqxy2uRETwiN9BiCQJ7TmX6Djn5nHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q0aWkVjQyap2SHMhg7tD2fVSM4QVBcXmayKBpMbsd7ZqL6TGgKmoa1TxppukQzA9u nyHJ1XpeGQW7df8tQym3oDdYJ5j4j27Dh6CKw76WskZB8ZBNPETh4Op+5rR2D8n6jw ydoxn7NYK1Oe54Vv4E7XjDwgMeqrpkzZz81dRprE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antoine Tenart , Russell King , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 064/222] net: phy: phylink: ensure the carrier is off when starting phylink Date: Sun, 11 Nov 2018 14:22:41 -0800 Message-Id: <20181111221653.690847797@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antoine Tenart [ Upstream commit aeeb2e8fdefdd5d257a1446351c70cb3df540199 ] Phylink made an assumption about the carrier state being down when calling phylink_start(). If this assumption isn't satisfied, the internal phylink state could misbehave and a net device could end up not being functional. This patch fixes this by explicitly calling netif_carrier_off() in phylink_start(). Signed-off-by: Antoine Tenart Acked-by: Russell King Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/phylink.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -747,6 +747,9 @@ void phylink_start(struct phylink *pl) phylink_an_mode_str(pl->link_an_mode), phy_modes(pl->link_config.interface)); + /* Always set the carrier off */ + netif_carrier_off(pl->netdev); + /* Apply the link configuration to the MAC when starting. This allows * a fixed-link to start with the correct parameters, and also * ensures that we set the appropriate advertisment for Serdes links.