Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5646603yba; Mon, 13 May 2019 14:44:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYFwx6oBXrH7W76n711/UrcaH4lCPlKw32Ko6+n0lsEblBJapVMppvIdN1bkdeDHKJCxi7 X-Received: by 2002:a17:902:7207:: with SMTP id ba7mr32574358plb.329.1557783891104; Mon, 13 May 2019 14:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557783891; cv=none; d=google.com; s=arc-20160816; b=Y3wbvj7pAVcEK7//MgZXogZEiNvv5i1me/3abJ1Y8xXKRBpcjprGpH/11aAAR62kAr qDL7UNlUp+q3ClymJhFfPfSThKnbfSopP6Us5TeijsmWWXFPA1OqjwMDgwsRRWWT6v5M 4Zhcb6Q+NLK6ySOueMMEPpdQ4doqQQj5Y5TDKewzFQ5ur0VQb7dYG3c39xmMQtr/yJ+Q IsIQxWdqlCoN2cVL0jlFTi30dBRWNN9G7yFTdbEBqQbsKwBmg26X1cNI7129MG10MTyV gihHKO2zs/PqlSY+hzFJSl2KQjO9LFcQTmdAJ+7j4ry7hpuE4mtvOJkv2KaQlOz68yeA Z1qg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z1/mEU0BH5C5OCDEDKNzem043jlI3NyAKsW8ae1HheE=; b=FLzNheWEAeFrGPpmvxueS1Mhy/tuXgNOQXH/PjhugCOF3EylWOXmWVGZSyqhw9kSTo e2RNZdUr3XirsvXnfoRE8L6WYVe9lRTG7qEZejtVZgW+nxTzYmKBb7aCvpa5P22nGJdu jPBoqDflL2u+IvuyV1/LYr8ssRIUKEkJMYVyC1yS/QG5wEzml7WxxwOOzt1gfxbW5VAl NQbHHOqAA7tm6ZxV2nlGfT+YHw9Tigr/H5JPk1l12WDpRzgBIN9vJM5BdMQ9xZ+3AG9y ThNY8tH01CfaBBVoHt8JjO3HVLfjDjpcaaOwRA/JMmgZlsz+SBG3dloQz6eSslTuM1RM N/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=C3RtlCdp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si17389571plf.240.2019.05.13.14.44.35; Mon, 13 May 2019 14:44:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=C3RtlCdp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726547AbfEMVng (ORCPT + 99 others); Mon, 13 May 2019 17:43:36 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34587 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfEMVng (ORCPT ); Mon, 13 May 2019 17:43:36 -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=z1/mEU0BH5C5OCDEDKNzem043jlI3NyAKsW8ae1HheE=; b=C3RtlCdpQwV99rSBCvKtGGYmLE EPv1I9hwqL0Os246k//uL4GN4zRurs76jrxSLngxsnUQ5L2kqdL2pPByzxlIA1Rzhr3m1xss5Toqh gOmbbuO5WWQyMWH2bZfTGL7KEkpSWLPXGhtkphHZPokBuoltVKkj2gUwkxatRxeKABts=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hQIjM-0004HU-UG; Mon, 13 May 2019 23:43:32 +0200 Date: Mon, 13 May 2019 23:43:32 +0200 From: Andrew Lunn To: Trent Piepho Cc: "hkallweit1@gmail.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "f.fainelli@gmail.com" , "devicetree@vger.kernel.org" Subject: Re: [PATCH 5/5] net: phy: dp83867: Use unsigned variables to store unsigned properties Message-ID: <20190513214332.GB12345@lunn.ch> References: <20190510214550.18657-1-tpiepho@impinj.com> <20190510214550.18657-5-tpiepho@impinj.com> <49c6afc4-6c5b-51c9-74ab-9a6e8c2460a5@gmail.com> <3a42c0cc-4a4b-e168-c03e-1cc13bd2f5d4@gmail.com> <1557777496.4229.13.camel@impinj.com> <20190513204641.GA12345@lunn.ch> <1557782787.4229.36.camel@impinj.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1557782787.4229.36.camel@impinj.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Hi Trent > > > > I already deleted the patches. For patch 3: > > > > + if (dp83867->clk_output_sel > DP83867_CLK_O_SEL_REF_CLK && > > + dp83867->clk_output_sel != DP83867_CLK_O_SEL_OFF) { > > + phydev_err(phydev, "ti,clk-output-sel value %u out of range\n", > > + dp83867->clk_output_sel); > > + return -EINVAL; > > + } > > > > This last bit looks odd. If it is not OFF, it is invalid? > > The valid values are in the range 0 to DP83867_CLK_O_SEL_REF_CLK and > also DP83867_CLK_O_SEL_OFF. Thus invalid values are those greater than > DP83867_CLK_O_SEL_REF_CLK which are not DP83867_CLK_O_SEL_OFF. Hi Trent O.K. > > Are there any in tree users of DP83867_CLK_O_SEL_REF_CLK? We have to > > be careful changing its meaning. But if nobody is actually using it... > > Nope. I doubt this will affect anyone. They'd need to strap the phy > to get a different configuration, and the explicitly add a property, > which isn't in the example DTS files, to change the configuration to > something they didn't want, and then depend on a driver bug ignoring > the erroneous setting they added. O.K, then this patch is O.K. Does the binding documentation need updating? > > Patch 4: > > > > This is harder. Ideally we want to fix this. At some point, somebody > > is going to want 'rgmii' to actually mean 'rgmii', because that is > > what their hardware needs. > > > > Could you add a WARN_ON() for 'rgmii' but the PHY is actually adding a > > delay? And add a comment about setting the correct thing in device > > tree? Hopefully we will then get patches correcting DT blobs. And if > > we later do need to fix 'rgmii', we will break less board. > > Yes I can do this. Should it warn on any use of "rgmii"? No, i would only warn when there is a delay configured by strapping. If you want the PHY to be left alone, you should use PHY_INTERFACE_MODE_NA, which should be the default if there is no phy-mode property. If DT actually asked for "rgmii", it either means it is wrong and rgmii-id should be used to match the strapping, or both the strapping and the DT is wrong and somebody really does want "rgmii". > If so, how would someone make the warning go away if they actually > want rgmii mode with no delay? We take the warning out, and implement "rgmii" correctly, and let boards break which have broken DT. We have done this before, but without a period of time with a warning. > I suspect hsdk.dts is an example of an in-tree broken board that uses > "rgmii" would it should have used "rgmii-id". O.K, so when you submit the patch Cc: Alexey Brodkin Andrew