Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938761AbcKNVlC (ORCPT ); Mon, 14 Nov 2016 16:41:02 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:41604 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932462AbcKNVk7 (ORCPT ); Mon, 14 Nov 2016 16:40:59 -0500 Date: Mon, 14 Nov 2016 16:40:57 -0500 (EST) Message-Id: <20161114.164057.379572642582264115.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@st.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: stmmac: Fix lack of link transition for fixed PHYs From: David Miller In-Reply-To: <20161114015036.6926-1-f.fainelli@gmail.com> References: <20161114015036.6926-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 14 Nov 2016 12:41:29 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 25 From: Florian Fainelli Date: Sun, 13 Nov 2016 17:50:35 -0800 > Commit 52f95bbfcf72 ("stmmac: fix adjust link call in case of a switch > is attached") added some logic to avoid polling the fixed PHY and > therefore invoking the adjust_link callback more than once, since this > is a fixed PHY and link events won't be generated. > > This works fine the first time, because we start with phydev->irq = > PHY_POLL, so we call adjust_link, then we set phydev->irq = > PHY_IGNORE_INTERRUPT and we stop polling the PHY. > > Now, if we called ndo_close(), which calls both phy_stop() and does an > explicit netif_carrier_off(), we end up with a link down. Upon calling > ndo_open() again, despite starting the PHY state machine, we have > PHY_IGNORE_INTERRUPT set, and we generate no link event at all, so the > link is permanently down. > > 52f95bbfcf72 ("stmmac: fix adjust link call in case of a switch is attached") I added the missing "Fixes: " here. > Signed-off-by: Florian Fainelli Applied and queued up for -stable, thanks Florian.