Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp816318ybh; Mon, 13 Jul 2020 01:51:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUNLsOISMqb5xnmSqKq0FTwHcMWUP4VICz/+ClPfqi18T5Cc3mtohHNZ+b2MbgFziO9L6T X-Received: by 2002:a17:906:3acd:: with SMTP id z13mr55593576ejd.69.1594630298240; Mon, 13 Jul 2020 01:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594630298; cv=none; d=google.com; s=arc-20160816; b=ApLy0SWTSlGa3GF9l84oax/Bw9jSWYNWT+2elKuxM6A/9Eei5lnMVw/q1C+rVp65IV eodAF6rSXJJRCZpHZi1uTbm5HZuYvtlFo6YpEYV/3wUPzoETGNjieAIPxzXqtTGpMHlF demvJuVk3OKM8+uKPQel6ROtPYGESHErogo/lBXFNVkja4nzhYnveiAz+65oVcWHGQZr /9qjt6NLi/bcKfzSLjNvuD5Lkvz8g/9DbfyO6y7Y2AvRAu4tA+5DZeml3S2Dq2cz58GC KWbd2Iu2Hki1jfZJIoLIK3o2pE3kkigXMFp1GiPivJvNngKBCVp9K8uTqwm9/EnMQWCa O//A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=91vPzSyt2Vvismqo0PYMwdt1dCqGeHvOBDjALiBZvBE=; b=jY04HRx4bOwacFPPCKB+3fKf2MJnVD6tb+v3V9l5pAE8vVSbcrOEhXX8ZGhxA2MYUP eQCbv38hfr73q2hmLExLs8Y5GJgqxdmFNAfMTf4XFl/uoUprHtzEKEIPnR7YtprKJi6t AW40K96jwQZCmS+e15qpqJXT5b1grJgCtv47KjrANEIxzZXMMPOS5JJBakTR95lZCJr6 /VeRaLbzY0hHvtuUKSzLw44XZEVHBiW5NxgPS7pbxuRDpSI6flNgVFhVp8CpJc4yEWOX oUSlUyVB83iwTOiAxtCSvq0vp5peHYAvKXaYfJhxsMK+xFWT2cD1nQq/KsFzcOxW6pOX QRfw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si8507900eja.618.2020.07.13.01.51.15; Mon, 13 Jul 2020 01:51:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728714AbgGMIuu convert rfc822-to-8bit (ORCPT + 99 others); Mon, 13 Jul 2020 04:50:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgGMIut (ORCPT ); Mon, 13 Jul 2020 04:50:49 -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 A40D3C061755 for ; Mon, 13 Jul 2020 01:50:49 -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 1juuAh-0004be-G8; Mon, 13 Jul 2020 10:50:47 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1juuAc-00038J-QU; Mon, 13 Jul 2020 10:50:42 +0200 Date: Mon, 13 Jul 2020 10:50:42 +0200 From: Oleksij Rempel To: Andrew Lunn Cc: Florian Fainelli , Heiner Kallweit , "David S. Miller" , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Philippe Schenker Subject: Re: [PATCH net-next v1 5/5] net: phy: micrel: ksz886x/ksz8081: add cabletest support Message-ID: <20200713085042.6t3b6svujwxpc5ez@pengutronix.de> References: <20200710120851.28984-1-o.rempel@pengutronix.de> <20200710120851.28984-6-o.rempel@pengutronix.de> <20200711182912.GP1014141@lunn.ch> <20200713041129.gyoldkmsti4vl4m2@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20200713041129.gyoldkmsti4vl4m2@pengutronix.de> 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: 10:47:55 up 241 days, 6 min, 248 users, load average: 0.06, 0.14, 0.20 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 06:11:30AM +0200, Oleksij Rempel wrote: > On Sat, Jul 11, 2020 at 08:29:12PM +0200, Andrew Lunn wrote: > > On Fri, Jul 10, 2020 at 02:08:51PM +0200, Oleksij Rempel wrote: > > > This patch support for cable test for the ksz886x switches and the > > > ksz8081 PHY. > > > > > > The patch was tested on a KSZ8873RLL switch with following results: > > > > > > - port 1: > > > - cannot detect any distance > > > - provides inverted values > > > (Errata: DS80000830A: "LinkMD does not work on Port 1", > > > http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8873-Errata-DS80000830A.pdf) > > > - Reports "short" on open or ok. > > > - Reports "ok" on short. > > > > > > - port 2: > > > - can detect distance > > > - can detect open on each wire of pair A (wire 1 and 2) > > > - can detect open only on one wire of pair B (only wire 3) > > > - can detect short between wires of a pair (wires 1 + 2 or 3 + 6) > > > - short between pairs is detected as open. > > > For example short between wires 2 + 3 is detected as open. > > > > > > In order to work around the errata for port 1, the ksz8795 switch driver > > > should be extended to provide proper device tree support for the related > > > PHY nodes. So we can set a DT property to mark the port 1 as affected by > > > the errata. > > Hi Andrew, > > > Hi Oleksij > > > > Do the PHY register read/writes pass through the DSA driver for the > > 8873? I was wondering if the switch could intercept reads/writes on > > port1 for KSZ8081_LMD and return EOPNOTSUPP? That would be a more > > robust solution than DT properties, which are going to get forgotten. > > Yes, it was my first idea as well. But this switch allows direct MDIO > access to the PHYs and this PHY driver could be used without DSA driver. > Not sure if we should support both variants? > > Beside, the Port 1 need at least one more quirk. The pause souport is > announced but is not working. Should we some how clear Puase bit in the PHY and > tell PHY framework to not use it? What is the best way to do it? On other hand, if adding this quirks in to switch driver is acceptable way, i'll be happy with this as well. 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 |