Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1481962ybt; Sat, 11 Jul 2020 11:30:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIzeXC86A03tL6AkYg6lx30GRtv/6gHAlyhXqbaqoo3lbR6m7CyGJj9PEGnpkiKlyCXxDd X-Received: by 2002:a17:906:7387:: with SMTP id f7mr48941436ejl.131.1594492201575; Sat, 11 Jul 2020 11:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594492201; cv=none; d=google.com; s=arc-20160816; b=LgdQZjj2MEWa+O52VouT2A3mVpqXcgvjtYEPGsQXcHTpsda9otXjY09CHZkYW0z6L9 95ER/VY98pTJnWtEqo7GfPeuDajdqOPbUBgFQBY1Y10oNFtsA8E+uaoZnw5TQJ+cfPgL OLGbOMHY/s2A4JfhFvYKrYEWETvvpVwr99fmQ0byUWkKSnMhHgCKtkd9v+7cs5pUqnUA rDOZADDs5BG/0sizv4Lyh/9hVnnQPs2diUZkl1uCTSOfqGVZpRV4An+tpzMIFiwkVaL6 tctFwAey1FL+JSG8YcXE5prJ3aPFpvLYPZvxPS1MtqIHauNFqDf3TosGUqTDMTVPmlAD O8rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=osPRRcHq/FadVj6Z1CKee+zN+5nZU+zf4mCP0yEQjZA=; b=vX7FKK2Yy8AzZ1lkxVuftejh7oA6+rk3bCsKtIMrYoZaoHoejWA4/9xVLKdM04CP0i TIGwwQOdrvGoSxDM71CcfNrVe7CvBk2qBWVVnHtv1QYJkxQ+PyDywNPSEKV5OiJXFs/7 jBetjjxBQfjc/rYh18tBqOiBlg5izwdUPz7hdx+WwV0gtm08mDEQwohbcDsOamFWVD7y 18bE0/+bNC9HWzgTeobNZObiU16P9tpgogXNxl2wzbFsstcYu9nU8fXDgoPoiP1R+Ohq uXHZkr8bh/HNZuo73DqjC9Wt7i/UQ9TlfX+RDFSrgwwmKJECbrac0AiM4uhuF2ZH8ZcU C7dg== 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 i2si6227583edn.115.2020.07.11.11.29.38; Sat, 11 Jul 2020 11:30:01 -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 S1728707AbgGKS3U (ORCPT + 99 others); Sat, 11 Jul 2020 14:29:20 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:58694 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgGKS3T (ORCPT ); Sat, 11 Jul 2020 14:29:19 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1juKFM-004eAj-D9; Sat, 11 Jul 2020 20:29:12 +0200 Date: Sat, 11 Jul 2020 20:29:12 +0200 From: Andrew Lunn To: Oleksij Rempel 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: <20200711182912.GP1014141@lunn.ch> References: <20200710120851.28984-1-o.rempel@pengutronix.de> <20200710120851.28984-6-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710120851.28984-6-o.rempel@pengutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. Andrew