Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1676219imm; Thu, 19 Jul 2018 06:07:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe4ffAG8BUfNDZw2TcHHt5RZXEw0DwJSB74KC1t4nacjNpEjEstSm3sZYKI/ftu1xtFspNm X-Received: by 2002:a17:902:102b:: with SMTP id b40-v6mr10106528pla.125.1532005653051; Thu, 19 Jul 2018 06:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532005653; cv=none; d=google.com; s=arc-20160816; b=lyFHOAi9u2VraztXSM/1+3SAuP1UFs8syOd35ZtxxmVX+UtMg/3pQNy2heeFvYJnu7 2scWGFUFY3zZAlTVMTPym2ldM0yb2Ex28xD4O3r0Hjiu98Ph0Dwh02EvifmMWVSuXXfM E2lVw+EMyXgRmTP9JjbO5aU+i8oEk+VSkflKlITDn3dsZu6e/PmdJdyA3U5Re16myqB0 VD2QINF46LC5aHIEkNJt90qItPvWNKUTg2xjS9I//n9H9uaTjzt+l+3Lkl+K4kjK1sl/ aeweOEaaBjLSKy5k92uRGKDzfJEYQWaLXQHSYiXVazQ9c7mOv7iETGJJaOCbH/sYgcEi R7vA== 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:arc-authentication-results; bh=1QuEvPjlCURjMu7XzfMmTdKXF4pRjHGYWS9HmKfJfW0=; b=Jvdi8w1HKe4RS9lt7HQHyJW1ipPRAEeNWzjCKPWP05KHQXvXsZkjYxUcCICfnlq2a6 iSzrnTFwlicl/POlSCq6tW0Eq+U7t6qz+vttIaYNgYhpSj24zsL1OGMRtqewHu7PX838 gB6/2uXZ3M1EC7Io5uaf8UQx88Q1uj0JDT7K+HlNCJFCndb8pXcTAqYZvqYUTxiOK2kT Rn3g/cAVfyr/KW9koFNAsaM1kQ1s4vbst0hscaNdKF6NzQpN2EDV6ghm2xprkeO2B7sq DoAH5l9M5wNvCmNnkf3GCw21Apv2ntRIVrSeTM5Li4oDnpwAwEzhlrRwK4lW38FhydMc 8Sdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=PHf1MTsU; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16-v6si5210336pgw.389.2018.07.19.06.07.18; Thu, 19 Jul 2018 06:07:33 -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=@armlinux.org.uk header.s=pandora-2014 header.b=PHf1MTsU; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731800AbeGSNtJ (ORCPT + 99 others); Thu, 19 Jul 2018 09:49:09 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:56638 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730663AbeGSNtJ (ORCPT ); Thu, 19 Jul 2018 09:49:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=1QuEvPjlCURjMu7XzfMmTdKXF4pRjHGYWS9HmKfJfW0=; b=PHf1MTsUkvIBGTRJd+0p5X4/C QuAnmZ43EgO4rZEatmeaMIzg7vG7b8ahcfErOJ+ex9GkdxQKzp4o1e87AWwUCNgs/OI19KJvuJhpP ZsIeXMQB8y4Jc6xXv+VI/uyYCV28mVpX1oNw67kq8XGNmIdirqED6ghMOFF8tlvpHoknQ=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:46850) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fg8U6-0005ig-7J; Thu, 19 Jul 2018 13:56:42 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1fg8U0-0002l5-M4; Thu, 19 Jul 2018 13:56:36 +0100 Date: Thu, 19 Jul 2018 13:56:35 +0100 From: Russell King - ARM Linux To: Camelia Alexandra Groza Cc: Andrew Lunn , "f.fainelli@gmail.com" , "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] net: phy: use generic clause 45 autonegotiation done Message-ID: <20180719125635.GK17271@n2100.armlinux.org.uk> References: <1531919535-20269-1-git-send-email-camelia.groza@nxp.com> <20180718143919.GA10856@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Thu, Jul 19, 2018 at 12:47:18PM +0000, Camelia Alexandra Groza wrote: > > -----Original Message----- > > From: Andrew Lunn [mailto:andrew@lunn.ch] > > Sent: Wednesday, July 18, 2018 17:39 > > To: Camelia Alexandra Groza > > Cc: f.fainelli@gmail.com; davem@davemloft.net; netdev@vger.kernel.org; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH] net: phy: use generic clause 45 autonegotiation done > > > > On Wed, Jul 18, 2018 at 04:12:15PM +0300, Camelia Groza wrote: > > > Only Clause 22 PHYs can use genphy_aneg_done(). Use > > > genphy_c45_aneg_done() for PHYs that implement Clause 45 without the > > > Clause 22 register set. > > > > > > This change follows the model of phy_restart_aneg() which > > > differentiates between the two implementations in a similar way. > > > > Hi Camelia > > > > What about phy_config_aneg()? I would assume any sort of auto-neg action > > needs to check for c45 without c22, before calling a genphy_ function. Do you > > think it is possible to write a genphy_c45_config_aneg()? If not, we might > > want to return -EOPNOTSUPP. > > Hi Andrew, > > Adding Russell to the thread as well, since he wrote the c45 helpers. > > Sure, I'll send a v2 with an additional generic phy_config_aneg(). I'll > stick to returning -EOPNOTSUPP for c22-less PHYs for now. Be aware that there are no generic registers for configuring (eg) 1G speeds in C45 phys - that is vendor specific. It may be that the expectation in the 802.3 specs is that such PHYs implement the C22 register set in devad 0, but I've no visibility of that (and the 10G PHYs that phylib does have, apart from marvell10g, are particularly poor in the features they implement.) -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up According to speedtest.net: 13Mbps down 490kbps up