From patchwork Thu Oct 29 10:07:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 11865873 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 885DEC5517A for ; Thu, 29 Oct 2020 10:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3019520790 for ; Thu, 29 Oct 2020 10:08:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Oly5ROF9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgJ2KIn (ORCPT ); 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-Google-Smtp-Source: ABdhPJz/gES0OcRDxqxBIrMCDiecnwPG8tigXvZS7YTBZdYsv6ZTbmsgMYNUhePuIIqcUCK78I+aow== 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 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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);