From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface Date: Thu, 15 Mar 2018 15:31:02 +0100 Message-ID: <20180315143102.GA28577@lunn.ch> References: <20180315064145.7022-1-sz.lin@moxa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Schuyler Patton , Grygorii Strashko , "David S. Miller" , Ivan Khoronzhuk , Keerthy , Sekhar Nori , linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: "SZ Lin (?????????)" Return-path: Content-Disposition: inline In-Reply-To: <20180315064145.7022-1-sz.lin@moxa.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > @@ -1014,7 +1014,13 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, > /* set speed_in input in case RMII mode is used in 100Mbps */ > if (phy->speed == 100) > mac_control |= BIT(15); > - else if (phy->speed == 10) > + > + /* in band mode only works in 10Mbps RGMII mode */ > + else if ((phy->speed == 10) && > + ((phy->interface == PHY_INTERFACE_MODE_RGMII) || > + (phy->interface == PHY_INTERFACE_MODE_RGMII_ID) || > + (phy->interface == PHY_INTERFACE_MODE_RGMII_RXID) || > + (phy->interface == PHY_INTERFACE_MODE_RGMII_TXID))) Please use phy_interface_mode_is_rgmii() Andrew