Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp306247pxx; Thu, 29 Oct 2020 03:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDyt/EHvVM7XUum4Q760m2lwo7N2iWH8R1uHWbuzR6LGpBQhLgewMYWS5St/ztqfoUMsMG X-Received: by 2002:a17:906:268c:: with SMTP id t12mr3092256ejc.377.1603966228296; Thu, 29 Oct 2020 03:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603966228; cv=none; d=google.com; s=arc-20160816; b=pXZ2SKsrDcw5w0TnpUQ3SPmI6jB/fMK5riV4/LAc9Gqr2a2qva7wA2LUK+WlHnx9vB YIChnUzdnPVkeU7uJB0ywbwotj5VmrxygKVTd6nnOuarvktzBkjvh9em/MlwhamwcltX IyIV+PGzPCjm/CcjGM6Z36W3rXnIQV44RHH3D7aBK71suqXu9va6jjJqGG5ShkUDFDVV Ozui+fUtOVDezMNOsjaXUjfcu/VVTQg3L0zcG0UBbOXbZZeaVMJzUlkBIOXTa2ZLbTqs KNZYaimokTYUy0tn0tJVsutReD0LQKNdak2vF63lnvY+ztsfi/f/2M3qR+ZGGY0iBQJJ GyQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/lU7t5C16nI74WaNsPpeNWamdxDGkiWfNc209gZvk9I=; b=HydOVl1q7xdbYCaJA+5UFB94ONbxxgLsI1VfUz1deEGY3oSsI0dZRKqS33KKWYpZMM mNxdGw1yL178Fwff0AZ8OhvfonkJOo7DPW0U/r4rBM8HNxsJu5jOoPDdbnnWlPI/Q4cu i+E06MiBOMU5DwdG7M1jxkOFnr9LUCB+wyOgLUJ9e8fJPgXL/fTbViT8NRqD7tj4JriN 5U0hBiCrEF/s48IbkSuuaGSgPN9JzZERJR4/3BgkDC3fK3as3TQMbkWPrImPfj6ia6ND o46WJGH/pkP0GOwmCdcgoMVcvK805PtqNAz/iPgWfWXK2h7J2/upj8WtfpJYQTLZX41z QfHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oly5ROF9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga41si1445084ejc.620.2020.10.29.03.10.04; Thu, 29 Oct 2020 03:10:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oly5ROF9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726302AbgJ2KIn (ORCPT + 99 others); Thu, 29 Oct 2020 06:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgJ2KIk (ORCPT ); Thu, 29 Oct 2020 06:08:40 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51E46C0613CF; Thu, 29 Oct 2020 03:08:40 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id dn5so2403515edb.10; Thu, 29 Oct 2020 03:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/lU7t5C16nI74WaNsPpeNWamdxDGkiWfNc209gZvk9I=; b=Oly5ROF98UO8JErH1xVgJHZz7aQyzcMnNGxsW3zUv5ognVrUNUIudaHuoOZio40WAY 72E2NZjFISYgxOzttfsHLizFKGx+AbujgIoDQkzaqAPB0V+oj3WCUMVy3SXxaPWpzam3 gGNaCZ0cYQzXQQKFa6BiyvFhTcBRC5ybdp8XypAJkmmPWDYeBPvnLcLYdoekytWLAMlr F5ohxA3NuzUTqDWLQUv2F3tsc+mLeRnqFPcoOuKtwOfhOseB4/4/s+I4Mnz0mdRXlHN0 01TJB+JL28f/XpL28mDi1b3GQWAK0oDw+qwg+K3GIuQ69bDQxZS0ywnZDoOdxmXO9lEC 3l7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/lU7t5C16nI74WaNsPpeNWamdxDGkiWfNc209gZvk9I=; b=a9RIxxy2eEJceFo3NblZyrDqPDNsgrKGO3q7b4NJEuM0DeX78VyQV3V0FfJnQEDNLO iC0OO3IRtg19VbNHRyJ04Xo9UOkjHzm3OnyTfXEAmMBdLn0hqBeXaKvGmIQSpO21D53W GtaZ7JXJzWcK3PDSQxr/GkgBR6GTRlI508tVdZD5RuiIIZOFo2Q2h4G0x7VvIo3ZG3/V QDDCH1DLp9+JWftqlhfgpoKvMervXrFqJLw0y4aZQoxjM5Q1lUDNqqob4uu0KB+bEyXm u69Ol0OH0HeqbAP1wlOiPeMkHrBA+UX0wPzequSzNUVGPRNnbOX+TqWSK9wvGlPjiIlp g6aQ== X-Gm-Message-State: AOAM5336yCdGu592LE3Jvoc2ooVYHvJC2rCD143g2kQJnw+E2KKmrISs 4I0VhGXR8E36dQpVXgbp1/c= X-Received: by 2002:a05:6402:b35:: with SMTP id bo21mr3273478edb.52.1603966119068; Thu, 29 Oct 2020 03:08:39 -0700 (PDT) Received: from yoga-910.localhost ([188.25.2.177]) by smtp.gmail.com with ESMTPSA id m1sm1198650ejj.117.2020.10.29.03.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 03:08:38 -0700 (PDT) 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: [PATCH net-next 01/19] net: phy: export phy_error and phy_trigger_machine Date: Thu, 29 Oct 2020 12:07:23 +0200 Message-Id: <20201029100741.462818-2-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201029100741.462818-1-ciorneiioana@gmail.com> References: <20201029100741.462818-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ioana Ciornei 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