Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp698641ybh; Sun, 12 Jul 2020 21:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0W9O8/6phN+ppphmQQU8TavZCG7rrntfF6sS4pFzL+oW64n5bQnq752jrC2VW+7kzLG+J X-Received: by 2002:a17:906:1151:: with SMTP id i17mr75719759eja.535.1594613529652; Sun, 12 Jul 2020 21:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594613529; cv=none; d=google.com; s=arc-20160816; b=GY3pKArn+8y/qbUxwo/hSX8u+mU3+U1FKPrgI3dHZzjDgzE7+Qies0waLpvu8zuZhJ yoeooPBiXs54CbgXEBqefvcwqjgmnQWBIL/KV7cQmuDL1noLUDPfUrJpjWFpDe736JnY 03BsXRHBIvmXaPPe7kGbczYA95czIi1Zxi8JTZaXDjxymdU2a71ebOcFqLe3i2BOU0dy ODkuObAJ/LFGfXCa4DWXhjeW1ygWSrqzQMfAPwmEGp/x7G1tUH0ol6TMN9vxYRbPd1Ng FXdpV/dIs8DeKmwKy2dmasyQg7FdtEwieoN1ViRME4MYQKgA08XNSmxI10qYPWi7xUqc RGKQ== 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=UTkyM+fe19AYDrRDhzNvKCI+U64tkOHZ01/nBYZkKzc=; b=Fpyc66wznN4IWJUqh5sCv+eCJSwtPQgyjd1RiAIk/dneocnNhZJHDXHjuOUaE1Yg07 mpBHNfDa2YmfI1FNFt98fDs6ht34bnmAUPN3P99DQg43gwp5cQPo19gNywpqyWrm7nA1 cNdQh+Dy848G+VbOGkv4Bk6swjb6PmUPSb1jO16F2chqS6MkWXsKE/RoyHjGMxnE9I4q b9DsQeu7TAwJRrCC6o4GfXK2mi+wTsTmA2Qqq3r1yvY/VX8V9aRuw9KCzTxEy4ZYm1Yw NlzecffABulkzapHMN8DlPQN5yDePIZUPeAgYcq8jOPsQFZmNKvjCLiexMHXLy56SYbH ZAyw== 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 cn9si8128746edb.325.2020.07.12.21.11.46; Sun, 12 Jul 2020 21:12:09 -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 S1726523AbgGMELl convert rfc822-to-8bit (ORCPT + 99 others); Mon, 13 Jul 2020 00:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgGMELl (ORCPT ); Mon, 13 Jul 2020 00:11:41 -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 B9E3AC08C5DB for ; Sun, 12 Jul 2020 21:11:40 -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 1jupoT-0000BJ-TV; Mon, 13 Jul 2020 06:11:33 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jupoQ-0006je-1S; Mon, 13 Jul 2020 06:11:30 +0200 Date: Mon, 13 Jul 2020 06:11:30 +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: <20200713041129.gyoldkmsti4vl4m2@pengutronix.de> References: <20200710120851.28984-1-o.rempel@pengutronix.de> <20200710120851.28984-6-o.rempel@pengutronix.de> <20200711182912.GP1014141@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20200711182912.GP1014141@lunn.ch> 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: 06:05:48 up 240 days, 19:24, 229 users, load average: 0.17, 0.13, 0.05 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 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? 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 |