Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B948C282C4 for ; Mon, 4 Feb 2019 21:28:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42F3C2082E for ; Mon, 4 Feb 2019 21:28:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="EP/7SxrQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729872AbfBDV2h (ORCPT ); Mon, 4 Feb 2019 16:28:37 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:38567 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbfBDV2h (ORCPT ); Mon, 4 Feb 2019 16:28:37 -0500 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=+Lyba0tsWRtFujwfG+UC7YR0AtAWoo0cG023s01AhJw=; b=EP/7SxrQkctTDq0ybuAobYwRYe RguDd43+CElxHc+V7pGvAuGYZ7Nt2XU7jYgaQXQXbBM5+YE4kNZoJSTivXBCWJ2YHD+29PHvAca3Z Nc8W8gTGqK17CEXfZh5N68gA4CegLrna8DgpVWZalBbDn2qk2l1pSZM5OsYpKvqh7fkQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gqln6-0001Es-BJ; Mon, 04 Feb 2019 22:28:32 +0100 Date: Mon, 4 Feb 2019 22:28:32 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , Nikita Yushchenko , "netdev@vger.kernel.org" Subject: Re: [PATCH 1/3 net-next] net: phy: aquantia: improve setting speed and duplex in aqr_read_status Message-ID: <20190204212832.GB3397@lunn.ch> References: <8e41695d-a23e-adad-ae3d-66a46d1ab077@gmail.com> 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 04, 2019 at 10:03:21PM +0100, Heiner Kallweit wrote: > Add support for speeds 10Mbps, 5Gbps, and 10Gbps. In addition don't > hardcode duplex but read it from the chip. Hi Heiner The marvell10g does this differently. It gets the local and link partner advertised link modes and from that works out what the PHY is doing. If auto-neg is not being used, it then reads the link speed from the PMA. The question is, should the Aquantia PHY do the same, or should it look an vendor registers? Apart from getting the 1G advertisement, all the Marvell code uses generic registers. So we should be able to move most of it into phy-c45 and reuse it. That is what i would prefer. Andrew