Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp937056lqs; Fri, 14 Jun 2024 09:42:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNEUiF/dMaWhKZcd5jdSlTJ6Zw4k2hpp27kx69NT8p9jK/CVbsQf+xAk74cuk9vEKNO90SVTDSGzfrF8hUY/fw5D0/ItPFMJthB7XD+w== X-Google-Smtp-Source: AGHT+IGCD4FYG8u293bDPmU7oIF1OzC1nrhxYrWWNz5MGnz2uwrLEZ4VRK/ly7goSidBayZjQ7ka X-Received: by 2002:a17:902:f68d:b0:1f8:62c3:2c4f with SMTP id d9443c01a7336-1f862c330acmr28229505ad.26.1718383362362; Fri, 14 Jun 2024 09:42:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718383362; cv=pass; d=google.com; s=arc-20160816; b=thabQUdtYAARMzE4+awKQckTOeHFZY8aQAJp/GO+O/A1sbjUcKAParwEmr5tr1cnAv rWF6dOqoy7QaRwqAFmjzcc5Y+BfJu4p/e/H0GbT70zmdLS3Eh3p8UXezDrGThrBqZ/y2 2tazsaLvLoEqpQnXI/7G5Wrqq16CksuUUWr0fzdgId4XZJ3jyV1WCE0RPyvXmwLPfAzx tfuP7V8My1trBWK+eiCFcbEK3AS95X+05vqPUZ5HqfE6dlKc7O4b0GOODNoUVXg9gWqD t18AKqQHnr4+LeS43nCMnOmPO+R8H3K/N/goxKNyNLU9TZDhn3DoR0bgDtOVWZptfj59 H9NA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=B2VjUwKceQQwMGKHWbz1lM0rEQov0zOGwqW6kNZ8YM4=; fh=r6AecMUqNjLHiuId+lkm7+Bvj+tBzrwvc3WK1EffdhA=; b=eHphKbHG/nDBSOTT9ZhFAY+jrPL+OmGZMbm0GXU1I+8TERJY1RTDqZ4JrcXrxcbsQp ts/wSxRGWswVLw9ly1hOPpVxQRc7C+BEa0THE0VmkTCv9qEGNyp/yR/OWQeVV6JKJt4u M7w7xbgIjUF1dUXdGyPNlpaOLrb0U5V/tQyvpxcTszVoKR+5yjd1Pa20QO+jMbzRMggB H3kJ/cR7zeNF9v8UNsC2Ipz1IZXdvJ819GjPG09w32WiZ5WQTnpC4g7HgB7mbAKzcb68 8vXyVrJ84EM9KhPNyztsOW4I4lxtuKg/1Ub+NdANA9wLFa60KmPblBJdcgy+DuhdjNhs sqeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ubimet.com header.s=20200131mdel header.b=Yk7mdXjD; arc=pass (i=1 spf=pass spfdomain=ubimet.com dkim=pass dkdomain=ubimet.com dmarc=pass fromdomain=ubimet.com); spf=pass (google.com: domain of linux-kernel+bounces-215285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ubimet.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855eff682si21341795ad.490.2024.06.14.09.42.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ubimet.com header.s=20200131mdel header.b=Yk7mdXjD; arc=pass (i=1 spf=pass spfdomain=ubimet.com dkim=pass dkdomain=ubimet.com dmarc=pass fromdomain=ubimet.com); spf=pass (google.com: domain of linux-kernel+bounces-215285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ubimet.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 19303280939 for ; Fri, 14 Jun 2024 16:41:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F69E190072; Fri, 14 Jun 2024 16:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ubimet.com header.i=@ubimet.com header.b="Yk7mdXjD" Received: from mx2-at.ubimet.com (mx2-at.ubimet.com [141.98.226.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A64E17C211; Fri, 14 Jun 2024 16:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=141.98.226.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718383298; cv=none; b=QfeL5yEZR3T0O8/GNK5BlEeyM+qqgsb2kbgjDGdjRInIkvYoXNYsoAwY3sVtSz9F69KfT3emHh8DiuBwXfrVdP7OWtCvQ06hDMz6RUdB4g9sVVghoVoZGwil6faaKcSz/u3e52XVtkUCeo62MdE3mJwgFJIb81y46nJ38d7/S4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718383298; c=relaxed/simple; bh=u0CLUF9D8xF20KbrpNAnEsmDnRC0WgC8ES3TgUkb6M0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sYFtb3LqEzVaaCynMwyYzs5jGLRB7CyHSjmp3x6mYvIBxZSSLnBsgqTDs5KGepU2EXNOd5403ylPFv/RyzGCbb2mnjubotkkPYEHV7slmRB/Nq/yPuXCNioWPjdBIEjtCEEIyfOLoXZQPiqc7BTDU9O9fNxSelyDkdSSSUJLnhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ubimet.com; spf=pass smtp.mailfrom=ubimet.com; dkim=pass (2048-bit key) header.d=ubimet.com header.i=@ubimet.com header.b=Yk7mdXjD; arc=none smtp.client-ip=141.98.226.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ubimet.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ubimet.com Received: from localhost (localhost [127.0.0.1]) by mx2-at.ubimet.com (Postfix) with ESMTP id BD5EC811C3; Fri, 14 Jun 2024 16:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ubimet.com; s=20200131mdel; t=1718383288; bh=u0CLUF9D8xF20KbrpNAnEsmDnRC0WgC8ES3TgUkb6M0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Yk7mdXjDeMN/IoiKDiGHorP6DgWn/0j+jo+l3JlQHrgaR4QZzyZu3qgfBpZL53Djk AdbAytUNn1PJpQaj0smAQ5GhPrerfe36wIFXa6CWtu8bJMCl6nmih1uWrXUZvHVlcY TDPmg7dd6Y7Yw+q6Sd3cUbySjZuMYOuMIfDQUrSOjlYzP0OlAIDQOcRm3e6J3krihC kWf6VGAA2rOnTCRExMP/hmp0aK1CFNH23steS7ZnzH3rDqD/kVHj589j761TJEajMs yH0Rmj7/+eK7cht5NYVKjFM/IROj7gEK9VeWhYg0UP9d6w9F3MoqjthxVL+iaMjTc6 BH6Uv7JElYsVw== Received: from mx2-at.ubimet.com ([127.0.0.1]) by localhost (mx02.dmz.dc.at.ubimet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vns50stZxRDz; Fri, 14 Jun 2024 16:41:28 +0000 (UTC) Received: from zimbra-mta01.ext.dc.at.ubimet.com (zimbra-mta01.ext.dc.at.ubimet.com [10.1.18.22]) by mx2-at.ubimet.com (Postfix) with ESMTPS id AAAEB80C5D; Fri, 14 Jun 2024 16:41:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta01.ext.dc.at.ubimet.com (Postfix) with ESMTP id 8C28A80762; Fri, 14 Jun 2024 16:41:28 +0000 (UTC) Received: from zimbra-mta01.ext.dc.at.ubimet.com ([127.0.0.1]) by localhost (zimbra-mta01.ext.dc.at.ubimet.com [127.0.0.1]) (amavis, port 10032) with ESMTP id OY7OjSXvoVcD; Fri, 14 Jun 2024 16:41:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta01.ext.dc.at.ubimet.com (Postfix) with ESMTP id A2C8A807F2; Fri, 14 Jun 2024 16:41:27 +0000 (UTC) X-Virus-Scanned: amavis at zimbra-mta01.ext.dc.at.ubimet.com Received: from zimbra-mta01.ext.dc.at.ubimet.com ([127.0.0.1]) by localhost (zimbra-mta01.ext.dc.at.ubimet.com [127.0.0.1]) (amavis, port 10026) with ESMTP id k-y1-UAd74-6; Fri, 14 Jun 2024 16:41:27 +0000 (UTC) Received: from pcn112 (pcn112.it.hub.at.ubimet.com [10.15.66.143]) by zimbra-mta01.ext.dc.at.ubimet.com (Postfix) with ESMTPSA id 56EF480762; Fri, 14 Jun 2024 16:41:27 +0000 (UTC) Date: Fri, 14 Jun 2024 18:42:09 +0200 From: =?UTF-8?B?Sm/Do28=?= Rodrigues To: Andrew Lunn Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:ETHERNET PHY LIBRARY" , open list Subject: Re: [PATCH net-next 1/3] net: phy: dp83867: Add SQI support Message-ID: <20240614184209.2ea5c9a4@pcn112> In-Reply-To: <0f7cef0d-b5ef-4feb-981e-c587e08de0e9@lunn.ch> References: <20240613145153.2345826-1-jrodrigues@ubimet.com> <20240613145153.2345826-2-jrodrigues@ubimet.com> <0f7cef0d-b5ef-4feb-981e-c587e08de0e9@lunn.ch> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 13 Jun 2024 19:13:27 +0200 Andrew Lunn wrote: > On Thu, Jun 13, 2024 at 04:51:51PM +0200, Jo=C3=A3o Rodrigues wrote: > > Don't report SQI values for 10 ethernet, since the datasheet > > says MSE values are only valid for 100/1000 ethernet =20 >=20 > The commit message could be better. Something like: >=20 > Don't report the SQI value when the link speed is 10Mbps, since the > datasheet says MSE values are only valid for 100/1000 links. >=20 Thank you, I will use your wording on the next version. > > +static int dp83867_get_sqi(struct phy_device *phydev) > > +{ > > + u16 mse_val; > > + int sqi; > > + int ret; > > + > > + if (phydev->speed =3D=3D SPEED_10) > > + return -EOPNOTSUPP; =20 >=20 > What does the datasheet say about MSE where there is no link at all? > Maybe you need to expand this test to include SPEED_UNKNOWN? >=20 The datasheet does not have any information regarding this register (or the related 0x265, 0x2A5 and 0x2E5, for the other pairs). The information from these registers come from the "DP83867 Troubleshooting Guide (Rev. B)". I will add the additional check for SPEED_UNKNOWN in the next version. Jo=C3=A3o