From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: [PATCH net-next 0/2] net: phy: remove parameter new_link from phy_mac_interrupt() Date: Wed, 10 Jan 2018 21:05:38 +0100 Message-ID: <62b422d5-bb33-2802-1467-babea8530537@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Andrew Lunn , Florian Fainelli , David Miller , Doug Berger Return-path: Received: from mail-wr0-f193.google.com ([209.85.128.193]:39126 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028AbeAJUFs (ORCPT ); Wed, 10 Jan 2018 15:05:48 -0500 Received: by mail-wr0-f193.google.com with SMTP id z48so184577wrz.6 for ; Wed, 10 Jan 2018 12:05:48 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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). bcmgenet driver so far is the only user, therefore changing the API has minimal impact. Heiner Kallweit (2): net: phy: remove parameter new_link from phy_mac_interrupt() net: bcmgenet: remove parameter new_link from phy_mac_interrupt() drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 ++++--- drivers/net/phy/phy.c | 10 +++------- include/linux/phy.h | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) -- 2.15.1