From patchwork Thu Apr 15 13:07:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 12205441 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 16359C433B4 for ; Thu, 15 Apr 2021 13:10:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCDE8611AC for ; Thu, 15 Apr 2021 13:10:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCDE8611AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AczANnueCEpPoGzPMRgaxy9gWU+QEsSeBWv37a5eywM=; b=PzEZkdsROWdRoFSdBC96PKWO2 ylWAyB80UYDyYj2LvUeG0LbEqFgk53/BMF5bzO5BNn3dYQDwmCn+CRdc7fB4bPbRA2YNFEDXxr1cs Gg+kuIMRWaTfsaNUi+38YSk5h7i7Q4xxTWmy/40wcBl4p1bFnFgUGR5eDpOR0rkV85OHC4eQPNNH9 QpUQRxrT0+KVFgv/Fk2xJXf8RKOfNRWAmxXg5AAy5MMptu+ejB9w+mgBU1u5xD0hxHnWN+roAAOlP lT51IlyMauqYWoBTMlB1Tob9QpgYIA9bc5/n/mlFOY/Yy13W9o56MpfJEsR39xgi8tePfET1pJ94m mbQ40NlTg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX1iz-00GCgr-WC; Thu, 15 Apr 2021 13:08:02 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX1io-00GCfF-8J for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 13:07:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bpVGx57XvQi2sregDi5dAdsFkYsMU2IJvI63BWpgqDA=; b=yHlL3sUw4aghyuQh2sXVmu/sZu itEPbmIsDDhZ+bGZyJ+erprwOjDhFLfDBN1/KVAPw2zakCCoQjgp0Jcuo/pzDaWV0lFFKTz0gVYw3 jfT2T06V6kYUh+iKXJD6j9DoQ5wJ9q5V8LsId4DPrCaSf7rlwMwz91PMISNR+pnSHVZMwIMaEvgbu W5iO1ziF6D0vNJQFqCRmV8+v2b7sgTxxX2gRe1LSv7F1ES5UmRNpHnUyF4Qz36caRKg9c5IZYrNbh JeGtAI0R5Iz+dE5iueSePyPDT5joBiAYuUylQrMkiecadOpzDDWnk0h38HbQoy9V83/KgH1v++wS0 F3/Pb6Ig==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX1il-008aeP-SR for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 13:07:49 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lX1ig-0006KR-Ua; Thu, 15 Apr 2021 15:07:42 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lX1if-0005Ko-Kh; Thu, 15 Apr 2021 15:07:41 +0200 From: Oleksij Rempel To: Shawn Guo , Sascha Hauer , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Fugang Duan Cc: Oleksij Rempel , kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam , David Jander , Russell King , Philippe Schenker Subject: [PATCH v2 2/7] net: phy: micrel: KSZ8081 & KSZ9031: add loopback support Date: Thu, 15 Apr 2021 15:07:33 +0200 Message-Id: <20210415130738.19603-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210415130738.19603-1-o.rempel@pengutronix.de> References: <20210415130738.19603-1-o.rempel@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_060747_933323_9B651E61 X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the generic net sefltest in combination with FEC ethernet controller and SJA1105 switch. Signed-off-by: Oleksij Rempel --- drivers/net/phy/micrel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index a14a00328fa3..26066b1e02e5 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -1311,6 +1311,7 @@ static struct phy_driver ksphy_driver[] = { .get_stats = kszphy_get_stats, .suspend = kszphy_suspend, .resume = kszphy_resume, + .set_loopback = genphy_loopback, }, { .phy_id = PHY_ID_KSZ8061, .name = "Micrel KSZ8061", @@ -1356,6 +1357,7 @@ static struct phy_driver ksphy_driver[] = { .get_stats = kszphy_get_stats, .suspend = genphy_suspend, .resume = kszphy_resume, + .set_loopback = genphy_loopback, }, { .phy_id = PHY_ID_LAN8814, .phy_id_mask = MICREL_PHY_ID_MASK,