Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1358698pxu; Sat, 24 Oct 2020 08:14:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwE7KqLV3a7aZqxIbMc/AivbEdVnUhNVpJOy/BkyAgZdwE9wBZRLG7LZmlvNlcRs5HTPrc X-Received: by 2002:aa7:c6d9:: with SMTP id b25mr7309035eds.27.1603552461309; Sat, 24 Oct 2020 08:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603552461; cv=none; d=google.com; s=arc-20160816; b=GzH3jAdzpk7JLKQ2eTnQchPdxbKcWUficjxO9Zphf0QiXE78ZwhqcfDYl35Px0KBny THPPdXu1Vs1wtSpnI+E+D35VONIb6VjWIHM7v5Yiue1Gcf8LZE6OBpWMvBoh2JM11qGc ri/Yn6btHXdjkdOVjADqHvRMY4AdxkxAvXoQX+BmBL0y8AbgHV9iE3Wginc5kDzqCKfG lz2zASaB0Ev4m3HDbnQ16Hc3NzWtkmwl/kWr0zcG4VZNegxHNXHbm2HhqQssRXCr5j9W qKuTPxIoqlJUAdEMMYS6Xyqz62ojHu3t86cbmr7gcerrReb9D97/nFYPPqsnYRK7pepa XEUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=dmwJT+GXWzpqzAU8pxKeNA8kyEHglHirPlh0ymzupoE=; b=GcqniahqyxHgnkJk/skaujlwB3XeVPyKWE91/iUfWmzZ/7XwqxNs74Kaa4NMR9jx2a OKSFOIKkMLUE6ZYoWTDyR+/hCP9cYsT3LH/qS1yPSMylf7bWilyR3+dWlDCYuW84erUK +Pz5BVTthMC+2G8Y487ujZIfaWaUlovYPRsqCfvWD0Cfxg+G475WSNjg+dtpC6tjIl04 jhXEn69S4UD9DzCjqZVfGJb6k4W1IBmtOsu/+DvXXTo8EBucQwhDfOMBrgpwOjcjFLrV GPeacPPOVCvp7gYqBo+mJuK/MJ1Vy1v3TNbW8WUjvaT7+rO4LvHINo3gGknj/KQmSABc owJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si4525300edc.350.2020.10.24.08.13.59; Sat, 24 Oct 2020 08:14:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761265AbgJXMOm (ORCPT + 99 others); Sat, 24 Oct 2020 08:14:42 -0400 Received: from inva020.nxp.com ([92.121.34.13]:35090 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761237AbgJXMOj (ORCPT ); Sat, 24 Oct 2020 08:14:39 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EF14F1A0C0A; Sat, 24 Oct 2020 14:14:36 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DF0301A0BB1; Sat, 24 Oct 2020 14:14:36 +0200 (CEST) Received: from fsr-ub1864-126.ea.freescale.net (fsr-ub1864-126.ea.freescale.net [10.171.82.212]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id C67F8202EC; Sat, 24 Oct 2020 14:14:35 +0200 (CEST) From: Ioana Ciornei To: Andrew Lunn , Heiner Kallweit , Russell King , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ioana Ciornei , Alexandru Ardelean , Andre Edich , Antoine Tenart , Baruch Siach , Christophe Leroy , Dan Murphy , Divya Koppera , Florian Fainelli , Hauke Mehrtens , Jerome Brunet , Kavya Sree Kotagiri , Linus Walleij , Marco Felsch , Marek Vasut , Martin Blumenstingl , Mathias Kresin , Maxim Kochetkov , Michael Walle , Neil Armstrong , Nisar Sayed , Oleksij Rempel , Philippe Schenker , Willy Liu , Yuiko Oshino Subject: [RFC net-next 1/5] net: phy: export phy_error and phy_trigger_machine Date: Sat, 24 Oct 2020 15:14:08 +0300 Message-Id: <20201024121412.10070-2-ioana.ciornei@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201024121412.10070-1-ioana.ciornei@nxp.com> References: <20201024121412.10070-1-ioana.ciornei@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These functions are currently used by phy_interrupt() to either signal an error condition or to trigger the link state machine. In an attempt to actually support shared PHY IRQs, export these two functions so that the actual PHY drivers can use them. Cc: Alexandru Ardelean Cc: Andre Edich Cc: Antoine Tenart Cc: Baruch Siach Cc: Christophe Leroy Cc: Dan Murphy Cc: Divya Koppera Cc: Florian Fainelli Cc: Hauke Mehrtens Cc: Heiner Kallweit Cc: Jerome Brunet Cc: Kavya Sree Kotagiri Cc: Linus Walleij Cc: Marco Felsch Cc: Marek Vasut Cc: Martin Blumenstingl Cc: Mathias Kresin Cc: Maxim Kochetkov Cc: Michael Walle Cc: Neil Armstrong Cc: Nisar Sayed Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Willy Liu Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei --- drivers/net/phy/phy.c | 6 ++++-- include/linux/phy.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 35525a671400..477bdf2f94df 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -493,10 +493,11 @@ EXPORT_SYMBOL(phy_queue_state_machine); * * @phydev: the phy_device struct */ -static void phy_trigger_machine(struct phy_device *phydev) +void phy_trigger_machine(struct phy_device *phydev) { phy_queue_state_machine(phydev, 0); } +EXPORT_SYMBOL(phy_trigger_machine); static void phy_abort_cable_test(struct phy_device *phydev) { @@ -924,7 +925,7 @@ void phy_stop_machine(struct phy_device *phydev) * Must not be called from interrupt context, or while the * phydev->lock is held. */ -static void phy_error(struct phy_device *phydev) +void phy_error(struct phy_device *phydev) { WARN_ON(1); @@ -934,6 +935,7 @@ static void phy_error(struct phy_device *phydev) phy_trigger_machine(phydev); } +EXPORT_SYMBOL(phy_error); /** * phy_disable_interrupts - Disable the PHY interrupts from the PHY side diff --git a/include/linux/phy.h b/include/linux/phy.h index eb3cb1a98b45..566b39f6cd64 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1570,8 +1570,10 @@ void phy_drivers_unregister(struct phy_driver *drv, int n); int phy_driver_register(struct phy_driver *new_driver, struct module *owner); int phy_drivers_register(struct phy_driver *new_driver, int n, struct module *owner); +void phy_error(struct phy_device *phydev); void phy_state_machine(struct work_struct *work); void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies); +void phy_trigger_machine(struct phy_device *phydev); void phy_mac_interrupt(struct phy_device *phydev); void phy_start_machine(struct phy_device *phydev); void phy_stop_machine(struct phy_device *phydev); -- 2.28.0