From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: C45 Phys and PHY_FORCING state Date: Fri, 19 Oct 2018 11:43:41 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , "netdev@vger.kernel.org" , Joao Pinto To: Jose Abreu , Andrew Lunn Return-path: Received: from mail-yw1-f68.google.com ([209.85.161.68]:37214 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbeJTCvK (ORCPT ); Fri, 19 Oct 2018 22:51:10 -0400 Received: by mail-yw1-f68.google.com with SMTP id 130-v6so2205387ywl.4 for ; Fri, 19 Oct 2018 11:43:52 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/19/2018 05:02 AM, Jose Abreu wrote: > Hello Andrew and Florian, > > Currently I have a 10G C45 phy that is fixed at 10G link. This > version does not support auto negotiation so I'm turning off the > feature in phydev struct field. I found out that when I do this > phylib is not composing C45 frames and is instead using C22. This > is due to call to genphy_udpate_link() which doesn't work on my > phy because it doesn't support C22. > > If I apply attached patch then things work perfectly fine. Can > you please review it ? Looks reasonable, I could not find other functions in the state machine that were not already abstracting the clause type, or letting a driver callback be called. Can you submit this as a formal patch against net-next (and not attached, but inline)? I would suggest creating a helper, e.g: phy_update_link() that way everything is well namespaced and clear within the state machine itself. -- Florian