From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed Date: Thu, 22 Nov 2018 19:33:33 +0100 Message-ID: <20181122183333.GF10697@lunn.ch> References: <1536709999-13420-1-git-send-email-andrew@lunn.ch> <1536709999-13420-5-git-send-email-andrew@lunn.ch> <3b502aeb-3362-22e4-d160-2ddd8371a389@bitwise.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , netdev , Florian Fainelli To: Anssi Hannula Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:45972 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbeKWFOL (ORCPT ); Fri, 23 Nov 2018 00:14:11 -0500 Content-Disposition: inline In-Reply-To: <3b502aeb-3362-22e4-d160-2ddd8371a389@bitwise.fi> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Nov 22, 2018 at 12:40:25PM +0200, Anssi Hannula wrote: > Hi, > > On 12.9.2018 2:53, Andrew Lunn wrote: > > Many Ethernet MAC drivers want to limit the PHY to only advertise a > > maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use > > of the helper function phy_set_max_speed(). > > But what if the PHY does not support 1Gbps in the first place? Yes, you are correct. __set_phy_supported() needs modifying to take into account what the PHY can do. Thanks for pointing this out. I will take a look. Andrew