Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3334378imm; Tue, 4 Sep 2018 21:07:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaqgAr3/+X6XhkGlzmuIrRH1KC2ZSxWOKS04y2qecP/g+JMS8/2fxsf2Bsvz19kAuUu78Z4 X-Received: by 2002:a62:435c:: with SMTP id q89-v6mr38616047pfa.135.1536120437143; Tue, 04 Sep 2018 21:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536120437; cv=none; d=google.com; s=arc-20160816; b=wb4cLT09/uy1NM+HzjhwES0OSJPOg71mxVbBSY8ZRGm5OXPD0Q62KeuTrlxU5cXu/Z ipdmBTGlfO7xIDp0tylCvUfkFpJy0QNpfGe4am22dS1u0FugT3tPS+R4IZUpZpq7XP5c 9kylvoS6uFwRQdtHw67BNa0VzstA4PegrYwGuE3wkxzZ2pRJYzx3rVgmpdafNACZ1QTK kVOunxGB3zdts8xTTnjFHENC6kEoJCQby1i8cj9N6XPxOj6daE5D34CjowrA+YN9aUgk KjpP0iBUg6caS2umJeszqephae1xtnp2FqkAc0f4rpfhVvC/9GSboe+2lRFskpBGWuig A2OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=ru3LkvNqiDLUo3vcjvBnu/LSVA4ozycOs2c8a7S8do4=; b=wQAqvHp2aftDFHHzojBHeBlJmjghTR9/E1XS6y3wNcjpz+shJ1N0ImGSXTGhswa1dE tnjpgrd03ol+kMfZvn1czoJrP5gD+nChMBKQu3Jea4VfIrq8JM0E/FbRxMPnmnse7U2U 5/v1sci/Zme65mm7pcxz7KM9VBW0RX8QDuL1a8HysjZq5NX7jXTlB8eYvAHLvsLqIWb7 zXmOqwiSshY8xk9isyJ/bUDNX8/EKAD1fFx+Ewk4BrCDzl11dbLFKC9Y2unKFeQOhwm2 YzIt+madXdMw8ZloBt2HW/sTfZ9YTj8MuFpZSLOTPpS+8PnXKIA2sp6fXbwp5v3/pUog KsTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ettus-com.20150623.gappssmtp.com header.s=20150623 header.b=S6YQpC5f; 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 88-v6si889006plc.515.2018.09.04.21.06.59; Tue, 04 Sep 2018 21:07:17 -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=@ettus-com.20150623.gappssmtp.com header.s=20150623 header.b=S6YQpC5f; 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 S1727421AbeIEIeA (ORCPT + 99 others); Wed, 5 Sep 2018 04:34:00 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:43082 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbeIEIeA (ORCPT ); Wed, 5 Sep 2018 04:34:00 -0400 Received: by mail-yw1-f66.google.com with SMTP id l189-v6so2125299ywb.10 for ; Tue, 04 Sep 2018 21:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ettus-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ru3LkvNqiDLUo3vcjvBnu/LSVA4ozycOs2c8a7S8do4=; b=S6YQpC5ffbJpDYpldaKw2V9X0oe+tmkpUVN/PZ/eTVCWcHUfJ0wFsgF6bgbxyeiG6R AAFVcxxY5em4D0EkE/pgG+ZcMYGLQjGytKXwY2ubLMQsuNbM+s+vhVimwHtCvCVsQ2ba V8VHVao0nl7BgkKIbxgJGYJrnZtZxXZsHR6lbOGPfOcQGiw/Dkl+Rev122FE6Fo3sNY9 BoLwwMZG9BcS6qsQqZzvfuwD4dmKbpNHeyl+NHuHSSY8BNHt24PUrbyalEpftWX5jSyw NuGSWc5O/BZ6fvmN201mneiCZ+BQeA7MCEDeZwTVek+lv1ZAo6c4yphlPUOdHDgxEdd/ XE4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ru3LkvNqiDLUo3vcjvBnu/LSVA4ozycOs2c8a7S8do4=; b=ar3xPbup1HlT5N6FW06KNQiAL+c+evCUuKQ71+ulXm515MMRjfDC6HeFsmgHPnNTlR h9erSjuvHuRSUWU2iuiqbk66vouAh2Yr3Njyqcavlsu809kG5I9uAjNCd90jbN9TkBuY UGPH8Ecl60MhxBQRvGaDuoeG3GcOwbvgwGfbpZnptVG0/IUgGpHGPqFrNUSAoJF94m/U +/Te7d7e5SeG9kUyV+MY4MBfX/8aUjqxvPaIKhdm0oF98qzNLjPpdJy7Y/ZN0st7GKm8 Trxy6b3XafTojugGMcKZUZ19MhI1a+9KuDvy6PBriq5OtfD183JPf9akUL1nohOGk6xq /k8w== X-Gm-Message-State: APzg51AVvP0rRUVbGt5Bz/5vy3fW9gUs65IxyN+hd3yJWjULeXTwMaQP UD18T2Eh5lnDmU21na/j5Jel7jC4zXzv5R9uFoX6Mg== X-Received: by 2002:a81:620b:: with SMTP id w11-v6mr19871855ywb.143.1536120346630; Tue, 04 Sep 2018 21:05:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0d:e106:0:0:0:0:0 with HTTP; Tue, 4 Sep 2018 21:05:45 -0700 (PDT) In-Reply-To: References: <20180905001535.19168-1-mdf@kernel.org> From: Moritz Fischer Date: Tue, 4 Sep 2018 21:05:45 -0700 Message-ID: Subject: Re: [RFC/PATCH] net: nixge: Add PHYLINK support To: Florian Fainelli Cc: netdev@vger.kernel.org, "David S. Miller" , Andrew Lunn , Alex Williams , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Florian, On Tue, Sep 4, 2018 at 5:27 PM, Florian Fainelli wrote: > On 09/04/2018 05:15 PM, Moritz Fischer wrote: >> Add basic PHYLINK support to driver. >> >> Suggested-by: Andrew Lunn >> Signed-off-by: Moritz Fischer >> --- >> >> Hi all, >> >> as Andrew suggested in order to enable SFP as >> well as fixed-link support add PHYLINK support. >> >> A couple of questions are still open (hence the RFC): >> >> 1) It seems odd to implement PHYLINK callbacks that >> are all empty? If so, should we have generic empty >> ones in drivers/net/phy/phylink.c like we have for >> genphys? > > Yes it is odd, the validate callback most certainly should not be empty, > neither should the mac_config and mac_link_{up,down}, but, with some > luck, you can get things to just work, typically with MDIO PHYs, since a > large amount of what they can do is discoverable. > > If you had an existing adjust_link callback from PHYLIB, it's really > about breaking it down such that the MAC configuration of > speed/duplex/pause happens in mac_config, and the link setting (if > necessary), happens in mac_link_{up,down}, and that's pretty much it for > MLO_AN_PHY cases. 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. 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? Cheers and thanks for your feedback, Moritz