Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2700261ybk; Tue, 12 May 2020 06:08:04 -0700 (PDT) X-Google-Smtp-Source: APiQypLo8+emqX63bq9MmmBhuYxmfy586kda+vtl4NuHGQsXUV3GuyWxArgbIRXVv0JkKZrpDXtP X-Received: by 2002:a17:906:809:: with SMTP id e9mr17026491ejd.81.1589288883843; Tue, 12 May 2020 06:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589288883; cv=none; d=google.com; s=arc-20160816; b=URLN9Flx6m0fY+GzHM4HPsoqIqFr2sgwfWlH6joje6AEc3FCOGny4bUVEf+CkAGzlY I1GpHV5gTG2AwCS6G3L8EWf+AnAJRyVyjsPHMcuJqAkyiIqNJuTl4D2K1syq0tUtCYqG ozhkNN7tKrNIL/NLbepRLEwCdeDN5WoWVFJWZghEaJFERNYHyKH1LaXD5IQzFuJgQ2iQ 5ztobLvj5ygsKqYJI+nHoSuVRxLDCylDYK156EebDr92hIi0FkNJEzdkWSwXCtrOon1X CYycIHjLfgXihazhIblyS9HoLJNKNH3lNd1CPH3Lfkf3W4DuogRikvDFmVS6uzJ9xOt3 1cvQ== 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 :dkim-signature; bh=jK4zL75kEjZz1WHIcEzDIz6MmRgpd2lB37qu5hoigyE=; b=pOsO+noPFvdsv82e7iwwJKAQehtFeKZs/I9ZEE4FiB0rK2kjTB5mTG53vFJofQfHV1 xKzm0qywdUNSXq9sG8zqzZ/pqoH97BBOmD8/n+2IWODTGrEtlnp8hm4pnzrxyNBJeEjW fN/OxRFnNrvImMm02AQgwRhQ33a2BBnsQI2GER4F1cnCDtKsAMisuI9gc9TNmvg9Uv5U HxD4dAApZZCCmt8KfV4UkI5AynRKon3WLLPMqBsFBNjanB+zFygWtMANTth5eHmU3eu1 q7OURcR6qRZ8ItcX2j27MRiFOuHwEiwu3bTRZAUby3e/8TG0SRquqQI6q8RHR7y+gw/K 3zxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tjtqKokO; 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 bt16si639863edb.7.2020.05.12.06.07.34; Tue, 12 May 2020 06:08:03 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tjtqKokO; 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 S1729977AbgELNEY (ORCPT + 99 others); Tue, 12 May 2020 09:04:24 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55666 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbgELNEY (ORCPT ); Tue, 12 May 2020 09:04:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jK4zL75kEjZz1WHIcEzDIz6MmRgpd2lB37qu5hoigyE=; b=tjtqKokOyIfsk0LplqjjgiF8GQ XQJaeOnbZX3W0brBh+PAsB2gClQIUJOLSsgbUFCTMBNPDEqPK+ATDHT8xvJEfbaNtKyxGz4PdIErE tmjm/JXTaID0uuSczX0FzK0Agi3iyaGawjwixtGjZrowAt17HUotA9IR+R/Jk0tsE+0c=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jYUa2-001zBu-6i; Tue, 12 May 2020 15:04:18 +0200 Date: Tue, 12 May 2020 15:04:18 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Michal Kubecek , Marek Vasut , Florian Fainelli , Jonathan Corbet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , mkl@pengutronix.de, kernel@pengutronix.de, David Jander , Jakub Kicinski , Christian Herber , "David S. Miller" , Heiner Kallweit Subject: Re: signal quality and cable diagnostic Message-ID: <20200512130418.GF409897@lunn.ch> References: <20200511141310.GA2543@pengutronix.de> <20200511145926.GC8503@lion.mk-sys.cz> <20200512064858.GA16536@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200512064858.GA16536@pengutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > As for getting / setting the threshold, perhaps ETHTOOL_MSG_LINKINFO_GET > > and ETHTOOL_MSG_LINKINFO_SET. Unless you expect more configurable > > parameters like this in which case we may want to consider adding new > > request type (e.g. link params or link management). > > Currently in my short term todo are: > - SQI > - PHY undervoltage > - PHY overtemerature Do you only have alarms? Or are current values available for voltage and temperature? Both of these would fit hwmon. It even has the option to set the alarm thresholds. The advantage of hwmon is that they are then just more sensors. You could even include the temperature sensor into a thermal zone to influence cooling. There are a couple of PHYs which already do hwmon, so there is code you can copy. > So far, I have no idea for PHY health diagnostic. > > If we consider at least the mandatory properties listed in the opensig, then > we would get following list: > > - DCQ (dynamic channel group) > - SQI (Signal Quality Index) > - HDD (Harness defect detection group) > - OS (Open/Short detection) ----------------- implemented, cable test > request. > - LQ (Link Quality) > - LTT (Link-training time. The time of the last link training) > - LFL (Link Failures and Losses. Number of link losses since the last > power cycle) > - COM (communication ready) ----------------- implemented? > - POL (Polarity detection & correction) > - DET (Polarity detect) Voltage and temperature are about the package. These are about the link. So they better fit ETHTOOL_MSG_LINKINFO_SET or similar. It sounds like LFL are statistic counters? PHYs can have their own counters, which ethtool -S will return. Does POLL somehow map to MDI MDIX? I guess not, since this is a T1. Andrew