From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,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 AE8A1C282C4 for ; Sat, 9 Feb 2019 16:35:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F785217D8 for ; Sat, 9 Feb 2019 16:35:59 +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="i/smpiTW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbfBIQf6 (ORCPT ); Sat, 9 Feb 2019 11:35:58 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:45258 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727021AbfBIQf5 (ORCPT ); Sat, 9 Feb 2019 11:35:57 -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=/Ve5NqpGzVXPwiqNrGeqwoOv8m4PLT+nSwbK/pU86XY=; b=i/smpiTWeLkzvUHzFUGBVuy047 4S5zRf7SvSaHCdekBDIRvAmtgjkQVhYPSgw2grXHjb6AM2tyRr4xXlpOW3KwJrFRJTXTfMeCPMNo7 w5mhikhshcGOAnUE9+6lrsraGLZQZ7b6r+Ixs9QIjATkV9kyvAvc0cQxHbfzHPIH/klQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gsVbe-0008Jp-Rd; Sat, 09 Feb 2019 17:35:54 +0100 Date: Sat, 9 Feb 2019 17:35:54 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next] net: phy: Add support for asking the PHY its abilities Message-ID: <20190209163554.GB30856@lunn.ch> References: <19c1e5c4-2f86-a3ff-e971-a0098c605b3f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19c1e5c4-2f86-a3ff-e971-a0098c605b3f@gmail.com> 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 Sat, Feb 09, 2019 at 03:24:47PM +0100, Heiner Kallweit wrote: > From: Andrew Lunn > Add support for runtime determination of what the PHY supports, by > adding a new function to the phy driver. The get_features call should > set the phydev->supported member with the features the PHY supports. > It is only called if phydrv->features is NULL. > > This requires minor changes to pause. The PHY driver should not set > pause abilities, except for when it has odd cause capabilities, e.g. > pause cannot be disabled. With this change, phydev->supported already > contains the drivers abilities, including pause. So rather than > considering phydrv->features, look at the phydev->supported, and > enable pause if neither of the pause bits are already set. Hi Heiner Ah, cool, these are the patches i was asking for, when you asked about splitting Maxime's patches. There is one more in my tree which converts the marvell10g to using this. I think that should be posted as well. It makes it clear how this should be used, and it replaces one of the patches in Maxime's set. > Signed-off-by: Andrew Lunn > [hkallweit1@gmail.com: fixed small checkpatch complaint in one comment] Thanks. Andrew