From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 1EAFAC43461 for ; Thu, 1 Apr 2021 07:48:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE2486105A for ; Thu, 1 Apr 2021 07:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233467AbhDAHsM (ORCPT ); Thu, 1 Apr 2021 03:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhDAHsA (ORCPT ); Thu, 1 Apr 2021 03:48:00 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06B7C0613E6 for ; Thu, 1 Apr 2021 00:47:59 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRs3V-0001u2-GP; Thu, 01 Apr 2021 09:47:53 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1lRs3T-000588-IB; Thu, 01 Apr 2021 09:47:51 +0200 Date: Thu, 1 Apr 2021 09:47:51 +0200 From: Oleksij Rempel To: Andrew Lunn Cc: Shawn Guo , Sascha Hauer , Florian Fainelli , Heiner Kallweit , Fugang Duan , 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: Re: [PATCH net-next v1 3/3] net: fec: add basic selftest support Message-ID: <20210401074751.so4m7k3pnhcjeofx@pengutronix.de> References: <20210330135407.17010-1-o.rempel@pengutronix.de> <20210330135407.17010-4-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:44:36 up 119 days, 21:50, 47 users, load average: 0.01, 0.04, 0.01 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 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-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 02:27:19PM +0200, Andrew Lunn wrote: > On Tue, Mar 30, 2021 at 03:54:07PM +0200, Oleksij Rempel wrote: > > Port some parts of the stmmac selftest to the FEC. This patch was tested > > on iMX6DL. > > With this tests it is possible to detect some basic issues like: > > - MAC loopback fail: most probably wrong clock configuration. > > - PHY loopback fail: incorrect RGMII timings, damaged traces, etc > > Hi > > Oleksij > > I've not done a side-by-side diff with stmmac, but i guess a lot of > this code is identical? ack > Rather than make a copy/paste, could you move > it somewhere under net and turn it into a library any driver can use? yes, I assume, it is possible to make this code complete generic for all devices, but we will need to provide some more call backs. For example enable MAC loop back, enable DSA loopbacks and so on. Do you have ideas for the new location of generic selftest code and where can be added loopback options for different levels? Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 B5B53C433ED for ; Thu, 1 Apr 2021 07:49:29 +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 29F5E60BD3 for ; Thu, 1 Apr 2021 07:49:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F5E60BD3 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RDSArG06VOumiETKhsaABCscHzoO6vHHuQPv91X/K9Y=; b=TDQj+BsDazX/CJ3jN5eIgUz7e //zaqEcS+oZXVApMF7HnRFDluQC4iRolVC933SuBQ43Mi0SKFhE8a/XzmfPY2UaMVdZ+Nm8d9SLkV 6G0WWks0KZe6iSL69apJILB50rVypLgrYu48VPjg66wmTh5RqeT6WgG8sMu9IxonBFyxm2GVUeetP hUThtJ+f3FUqykNOVP27flZf1hzElypohbVYRQPlcWX4LfX9wpphjbPOwF8KFdczUszHOitiar9Ot xXA9ydr0g2JNkjreI7f29KUDdEum63nmKvKUlRCFEjKBf5nW5OPM0YUeMBTGU5VAm5mObLO/Ubhdu SD03etapQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRs3d-008pTU-1Q; Thu, 01 Apr 2021 07:48:01 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRs3Z-008pSv-4n for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 07:47:59 +0000 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRs3V-0001u2-GP; Thu, 01 Apr 2021 09:47:53 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1lRs3T-000588-IB; Thu, 01 Apr 2021 09:47:51 +0200 Date: Thu, 1 Apr 2021 09:47:51 +0200 From: Oleksij Rempel To: Andrew Lunn Cc: Shawn Guo , Sascha Hauer , Florian Fainelli , Heiner Kallweit , Fugang Duan , 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: Re: [PATCH net-next v1 3/3] net: fec: add basic selftest support Message-ID: <20210401074751.so4m7k3pnhcjeofx@pengutronix.de> References: <20210330135407.17010-1-o.rempel@pengutronix.de> <20210330135407.17010-4-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:44:36 up 119 days, 21:50, 47 users, load average: 0.01, 0.04, 0.01 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 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-20210401_084757_294795_DFD48FFA X-CRM114-Status: GOOD ( 23.34 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 31, 2021 at 02:27:19PM +0200, Andrew Lunn wrote: > On Tue, Mar 30, 2021 at 03:54:07PM +0200, Oleksij Rempel wrote: > > Port some parts of the stmmac selftest to the FEC. This patch was tested > > on iMX6DL. > > With this tests it is possible to detect some basic issues like: > > - MAC loopback fail: most probably wrong clock configuration. > > - PHY loopback fail: incorrect RGMII timings, damaged traces, etc > > Hi > > Oleksij > > I've not done a side-by-side diff with stmmac, but i guess a lot of > this code is identical? ack > Rather than make a copy/paste, could you move > it somewhere under net and turn it into a library any driver can use? yes, I assume, it is possible to make this code complete generic for all devices, but we will need to provide some more call backs. For example enable MAC loop back, enable DSA loopbacks and so on. Do you have ideas for the new location of generic selftest code and where can be added loopback options for different levels? Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel