From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net-next 1/2] net: phy: remove parameter new_link from phy_mac_interrupt() Date: Wed, 10 Jan 2018 12:13:59 -0800 Message-ID: <531f1c67-6791-4ab8-ea24-06951e8821f7@gmail.com> References: <62b422d5-bb33-2802-1467-babea8530537@gmail.com> <80e1b32e-8d8a-a6a2-9e44-65fca8ae9cc2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Heiner Kallweit , Andrew Lunn , David Miller , Doug Berger Return-path: Received: from mail-qk0-f172.google.com ([209.85.220.172]:43045 "EHLO mail-qk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbeAJUOD (ORCPT ); Wed, 10 Jan 2018 15:14:03 -0500 Received: by mail-qk0-f172.google.com with SMTP id j137so571741qke.10 for ; Wed, 10 Jan 2018 12:14:02 -0800 (PST) In-Reply-To: <80e1b32e-8d8a-a6a2-9e44-65fca8ae9cc2@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 01/10/2018 12:11 PM, Heiner Kallweit wrote: > I see two issues with parameter new_link: > > 1. It's not needed. See also phy_interrupt(), works w/o this parameter. > phy_mac_interrupt sets the state to PHY_CHANGELINK and triggers the > state machine which then calls phy_read_status. And phy_read_status > updates the link state. > > 2. phy_mac_interrupt is used in interrupt context and getting the link > state may sleep (at least when having to access the PHY registers > via MDIO bus). > > So let's remove it. This looks fine in premise, but you really need to combine patch 1 and to 2 to avoid a build failure. -- Florian