linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org (open list),
	hkallweit1@gmail.com, bcm-kernel-feedback-list@broadcom.com,
	olteanv@gmail.com, rmk+kernel@armlinux.org.uk, cphealy@gmail.com,
	Jose Abreu <joabreu@synopsys.com>
Subject: [PATCH net-next 1/2] net: phy: Use genphy_loopback() by default
Date: Tue, 15 Oct 2019 15:49:52 -0700	[thread overview]
Message-ID: <20191015224953.24199-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20191015224953.24199-1-f.fainelli@gmail.com>

The standard way of putting a PHY device into loopback is most often
suitable for testing. This is going to be necessary in a subsequent
patch that adds RGII debugging capability using the loopback feature.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 9d2bbb13293e..c2e66b9ec161 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1514,7 +1514,7 @@ int phy_loopback(struct phy_device *phydev, bool enable)
 	if (phydev->drv && phydrv->set_loopback)
 		ret = phydrv->set_loopback(phydev, enable);
 	else
-		ret = -EOPNOTSUPP;
+		ret = genphy_loopback(phydev, enable);
 
 	if (ret)
 		goto out;
-- 
2.17.1


  reply	other threads:[~2019-10-15 22:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 22:49 [PATCH net-next 0/2] net: phy: Add ability to debug RGMII connections Florian Fainelli
2019-10-15 22:49 ` Florian Fainelli [this message]
2019-10-16 13:56   ` [PATCH net-next 1/2] net: phy: Use genphy_loopback() by default Andrew Lunn
2019-10-15 22:49 ` [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections Florian Fainelli
2019-10-16  8:55   ` Jose Abreu
2019-10-16 14:19   ` Andrew Lunn
2019-10-17 22:06   ` Vladimir Oltean
2019-10-17 22:22     ` Florian Fainelli
2019-10-17 22:49       ` Vladimir Oltean
2019-10-18 13:01         ` Andrew Lunn
2019-10-18 13:09           ` Vladimir Oltean
2019-10-18 13:23             ` Russell King - ARM Linux admin
2019-10-18 13:37               ` Vladimir Oltean
2019-10-18 13:54                 ` Russell King - ARM Linux admin
2019-10-18 14:12                   ` Vladimir Oltean
2019-10-18 16:01                     ` Andrew Lunn
2019-10-17 19:24 ` [PATCH net-next 0/2] " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015224953.24199-2-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).