Received: by 10.213.65.68 with SMTP id h4csp1713557imn; Thu, 15 Mar 2018 07:33:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELv7o7ocMn5Sxq68Lc7QTY45KfYFBiSKdcBQbeMw4oEhYjK3y8AGYFrdC9BuBAdD92gSVZDy X-Received: by 2002:a17:902:20ca:: with SMTP id v10-v6mr8558398plg.9.1521124400510; Thu, 15 Mar 2018 07:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521124400; cv=none; d=google.com; s=arc-20160816; b=C2OgZNKUiTSouDPZzH3DQYIMe/lhB13ipVRsy2+4Hw842K7FNstYw0BGVLj2nbw+wB qeYZhRhsxZa6+1hbVVj2BihnzqhYZeb/mc7xG4wMAF5IKEh7I3eI2TXdJEeFeJ8oEj1n koLk5owxp1SCSMs6mz5ddPfAIYFyNkT5uQ0jxyJfpq8O0Q638fc7CdynbqBkt3fj+DyR ni009sjvRR2XjYchYEyf7vELDF2n07xb3vuT1empaG1hA+oxvUOLhI3uMg7+7gu0oYq+ ai/WKO+abNvJUhJ2Kk3sYwyrQn+w3VqtBtFkVmXK5pGOK+D+RyA+6KtAUur46mTmX70h 7T2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Ysrd2h7WCiaplJ3XQpGew2alAv3yY6crGFh1gfsOBBw=; b=s9VQjd17QT+uAB+6GsXWW4W18oiCWaUid6yDdcGk71LthKg+iyhkhPfF3HX3uI4NCT wJ5aQowHu8sB3mY44FRYrRd+GODnC5fmPU6hpCKmNWu6SA58zOIG/AS7jQ5iyTu7mj9T 0iCPNUd606NHPfirNjaceowMb2vfj3wCr2bW/f7hEMextdagPO0y3bXDk8jIZz4lsVHY 9N+gXFdaVZ2hkR3grdE3rsm89v7pKhVx8uI2lZjF3XspAdRw76o1Zd5ejqcchpMGTyYw ggeC+YeukHWI0EqCtqdMc4rNP3b3R7Wddekn8nlRaP6ml4XdgQelpTNK/gaGzP+QLNBz B6Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=yPv27C46; 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 u82si3905515pfg.389.2018.03.15.07.32.51; Thu, 15 Mar 2018 07:33:20 -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=@lunn.ch header.s=20171124 header.b=yPv27C46; 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 S1752573AbeCOObY (ORCPT + 99 others); Thu, 15 Mar 2018 10:31:24 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:58641 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004AbeCOObX (ORCPT ); Thu, 15 Mar 2018 10:31:23 -0400 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; bh=Ysrd2h7WCiaplJ3XQpGew2alAv3yY6crGFh1gfsOBBw=; b=yPv27C46jQMPhXjuxo/A8VhMnHWVT4gt4MG3Szf5WWH4pI6HXDU9S4bWrTAdIrhovRTPgHuu6zWdSKZRrvalTLbTQ8hexeaNUktD50FlR5Xv0OHy+wBUQOSmQHsY9uZQhCY1svsv7Z6QjfNrT7leT3qPlg0fBGkwtsZDSFr7PXk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1ewTuI-0007jR-Rj; Thu, 15 Mar 2018 15:31:02 +0100 Date: Thu, 15 Mar 2018 15:31:02 +0100 From: Andrew Lunn To: "SZ Lin (?????????)" 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 Subject: Re: [PATCH] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface 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 Content-Disposition: inline In-Reply-To: <20180315064145.7022-1-sz.lin@moxa.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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