Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp805403ybt; Wed, 17 Jun 2020 14:38:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3VQrs7sQP+RYTnwcJ31HdVqKtSUwJeL9nYBXoJEHc2LCu3fQbFvbBHwC8iLOootCRfxyv X-Received: by 2002:a17:906:3456:: with SMTP id d22mr1093336ejb.358.1592429939333; Wed, 17 Jun 2020 14:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592429939; cv=none; d=google.com; s=arc-20160816; b=jmAPkV8FsLTnYSEvsQ/vAQ3yFdoV8DIhb61sR0ovAi3FXfPhUFVEG9jXbkkiQHMClm 2smfGmbX2qIvapRDWTHIKy4vWJq8/7F9bjI8y+ED1U/q714Ycmb/Qn4GOhLRVI06VOp+ YW3uZlnDoA/DXvbt1KwM4R5YnGmLXFuitLq/RLPiwKWcTzhqjxloNjbLvqUt55Ns+N7c 7oZ8Ynn+kUSIArUxXVOVWttIFbqt+wSVn4SeR3B2Xe5p7Hp1HUfjlHVJ6MZVhHBrnnPa UP+wYp1Fm1bEdE4Grz/U8p7N3gA7TZWwHlfKxCgDHwS3HDgJlynL2ypTpJDYuP9nxEqi TDmA== 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=Ll0EYuwlUbmr4B/0zDtQIvKlJd7lwy82bTdsvmFbei4=; b=XPTdYmCW1lanBQ+m/nZ1Q4GXde9eSVuOoRz5zX4P3KufIm8qocWxTK1OBBYS93JMks F6wa7NEYn36Mtqh6C2K6VNPzwI16HpRTF/w8vPmOU72fRh4lZQhSVIdFMngFlW+1P/0m MyJirdx472+Jsuns8rnkfFUKkbBMoUpnUMGo7u/zm+NpOpb1+tu9J3fbdfwI/SfV71SM SXK5vuR0gjFyYaBwyDasd0yaD7nL1z0KeVDj5KXWYrzjbooJRjwNx6oP6A7fZeTdBOPf NcRF9G+s3yOQiXFg5piY72kXqz4yBGYJQMaIEQOKCK0G+033fz1HZE+bVgt8GlKofa/S pYFw== 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 mj14si637835ejb.464.2020.06.17.14.38.36; Wed, 17 Jun 2020 14:38:59 -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 S1727021AbgFQVgu (ORCPT + 99 others); Wed, 17 Jun 2020 17:36:50 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45002 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgFQVgt (ORCPT ); Wed, 17 Jun 2020 17:36:49 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jlfje-0011mH-Tr; Wed, 17 Jun 2020 23:36:42 +0200 Date: Wed, 17 Jun 2020 23:36:42 +0200 From: Andrew Lunn To: Russell King - ARM Linux admin Cc: Dejin Zheng , f.fainelli@gmail.com, hkallweit1@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kevin Groeneveld Subject: Re: [PATCH net v1] net: phy: smsc: fix printing too many logs Message-ID: <20200617213642.GE240559@lunn.ch> References: <20200617153340.17371-1-zhengdejin5@gmail.com> <20200617161925.GE205574@lunn.ch> <20200617175039.GA18631@nuc8i5> <20200617184334.GA240559@lunn.ch> <20200617202450.GX1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617202450.GX1551@shell.armlinux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 17, 2020 at 09:24:50PM +0100, Russell King - ARM Linux admin wrote: > On Wed, Jun 17, 2020 at 08:43:34PM +0200, Andrew Lunn wrote: > > You have explained what the change does. But not why it is > > needed. What exactly is happening. To me, the key thing is > > understanding why we get -110, and why it is not an actual error we > > should be reporting as an error. That is what needs explaining. > > The patch author really ought to be explaining this... but let me > have a go. It's worth pointing out that the comments in the file > aren't good English either, so don't really describe what is going > on. > > When this PHY is in EDPD mode, it doesn't always detect a connected > cable. The workaround for it involves, when the link is down, and > at each read_status() call: > > - disable EDPD mode, forcing the PHY out of low-power mode > - waiting 640ms to see if we have any energy detected from the media > - re-enable entry to EDPD mode > > This is presumably enough to allow the PHY to notice that a cable is > connected, and resume normal operations to negotiate with the partner. > > The problem is that when no media is detected, the 640ms wait times > out (as it should, we don't want to wait forever) and the kernel > prints a warning. Hi Russell Yes, that is what i was thinking. There probably should be a comment added just to prevent somebody swapping it back to phy_read_poll_timeout(). It is not clear that -ETIMEOUT is expected under some conditions. Andrew