Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3751136imm; Wed, 5 Sep 2018 05:33:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY5wBRppzzAHNAMB3pG5s6Zd4dGn5iLADBkbMj3ubOgkKZc1Lp00DunI4xgO7NjPHRyQ5CO X-Received: by 2002:a17:902:2e83:: with SMTP id r3-v6mr38533340plb.80.1536150808256; Wed, 05 Sep 2018 05:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536150808; cv=none; d=google.com; s=arc-20160816; b=DpxxG8t3vf2W6GPIsHnjFGb3DdA2gmRCzM1+yjvYVgu7Mr57z1paMXMWEgXwMRRA9h fS4IUrUe2o/Pl8NJy/gIaFrSR89Gxxegc68P9PZFSQwbItktRaLqD5m+cWjI9x0Uim6r 2+PzZ8otioFz7X/Zp+kfm5ZnRo3ImC+mkimje8F1DtMVA02QxO8dI2RtlNfy/lO69Whe v9nHeevWNIKfhtSUjRnL6T1pTE6KVomTtgma0PRcMvhDPWLU3pFBC92QCGQhrHlYbVfY PVz1qeN73GS0e6DMc5hE1j9UYutfJcEz0sqh9UyiKh6FAlr+/Rggb+xJ+clBRfRYRmqW KYKw== 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=p5qBI66sU/PlIlrGvwVtJXuuRtG8YSAoOgnqo8Ja9vE=; b=PvzVgVRy5yg9alVdrErG6CQ2r03pJeYdskxqq5q1rwU/h3HkTWDRJLkJxQ1zsPumap MjdygGblPs4PFeJStIAvTpmsEhe735TjJF39wzJYc0MUoJkgBdcDumwu6xXkkHdFuSo9 mx7em/050zigmbUJo+3IJ8ZMfU5ibR5M0pkT63qubugOaFwH9AbAWkiCvkdL6kiSYw5F UHjr8As4AYbRjuX3ydC2OTgRr58EDAtKhjjwutxtzw6AmjRYAxqbl+zrSfufSRqq5iCj Byw6u4vsWNVp2n2qSXIweyjtHNL59zYmk1SEBpvQumA3us8F/b0hTe8K0mNPua+xTsOR E1VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="rQnD/GAQ"; 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 x10-v6si1807965pgl.567.2018.09.05.05.33.12; Wed, 05 Sep 2018 05:33:28 -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=pass header.i=@lunn.ch header.s=20171124 header.b="rQnD/GAQ"; 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 S1728167AbeIERBM (ORCPT + 99 others); Wed, 5 Sep 2018 13:01:12 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:53290 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbeIERBM (ORCPT ); Wed, 5 Sep 2018 13:01:12 -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; bh=p5qBI66sU/PlIlrGvwVtJXuuRtG8YSAoOgnqo8Ja9vE=; b=rQnD/GAQ+SWbliFQWkqN18Q/2hDUZ5QfWhRNl9CQOPbOvx4lJhsEMbfD66Vi2zGGZM72t7Bhg/CuFBhVfNnLFl7cKexR6AsXUSIPULxSNx7xTSkj0TShTmdaQKgnb9Rui1akhuU1bEUOatyVIT4x+FsyF/b/wyDjIzvZFBiVOZs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fxWxZ-00072O-7n; Wed, 05 Sep 2018 14:31:01 +0200 Date: Wed, 5 Sep 2018 14:31:01 +0200 From: Andrew Lunn To: Moritz Fischer Cc: Florian Fainelli , netdev@vger.kernel.org, "David S. Miller" , Alex Williams , Linux Kernel Mailing List Subject: Re: [RFC/PATCH] net: nixge: Add PHYLINK support Message-ID: <20180905123101.GA26739@lunn.ch> References: <20180905001535.19168-1-mdf@kernel.org> 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 > Let me check, it seems there is a register that indicates whether the MAC can > do either 1G or 10G. I might be able to use that for some of the above, but > there is not really much in terms of writable registers there. Can the MAC do 10 or 100? At the moment, you don't have anything stopping the PHY anto-neg'ing 10Half. If the MAC does not fully implement standard Ethernet, you need to tell the PHY driver about this. That is what the validate call is about. phylink and phylib knows what the PHY supports. It passes that list to the validate call. You need to then remove all the modes the MAC does not support. > It's like a DMA engine with a bit of MDIO on the side. Let me see if > I can make it look less weird with that. If not I'll go with a > comment explaining that there isn't much to do for the MLO_AN_PHY > case and the MLO_FIXED cases? You again need to configure the MAC to the selected speed, duplex, etc. If the link is down, you want to disable the MAC. You need this for both MLO_AN_PHY and MLO_FIXED, because both specify speeds, duplex, etc. Andrew