Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1131769ybh; Sat, 14 Mar 2020 18:56:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsXCaQE0AzM+Xcn65c/8OFqYnyR/NJNHEcMo4w0oFjUx/CmGHrkZgA3kcIobV9o6hO1fOYX X-Received: by 2002:aca:4710:: with SMTP id u16mr12147594oia.108.1584237365656; Sat, 14 Mar 2020 18:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584237365; cv=none; d=google.com; s=arc-20160816; b=KSGtvxSB4o/6SB5S7Nez9S6J4SEHzBcVxQ7OquzoWoFSdGvIlcD2T3k3sZa+opWzpL YbhWZZ0duoDuCtcSbGCtW4diZ69TlSPz2M77dhz6TCUYD69cyATGcMEKveP3JS1T3U8b 96krekRqjzVJkS7tKOHX6dBPX2V99b6Pb5lZdaCYiuCS41hP1tKO3g01/PCv5dPRC3fs bAN5fDLRVHFoWlDXiU9Pkv6pAOW+ZvDcoC3phKz2xL7NxnqBGhV2vsVFkLpn2a8E+EiQ LoCGSucixk1sMo5mGNXcBb5k3uAxQqrLhWz6BytOMJiuKnjd3bjn8Xys0ws8ZeqUqXSZ QLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NL3MJouei4eDxbtXys1XmSE5zsmrHAunj/d9XtHq32s=; b=l1hgGcOAAz+qMySyqOBCbAcOfkVDZir9c1d4krpnXOml5obud13Ed2GGUFbklOO4EI VBgdM2W6KkZxtDARc16jF9sl4MgnPIKXEfWatkviN8ze/7+ZPBiF+7d+7J1jA+qLEYdm FQPl4y4uEDKUM/zm5zqI42IOh5KgZV+ZbgeAk+O9ZCUGCohfkyIUbEcWdpTuVlDjvlnV XlDc6zGHJTFfbTYo0qgdTRX5CphBoPj5UUl4TkpYpG0eaAXHX+Puv7klszlNGE0ykQoR sq4kgnYqfg8DOha4hvFVuWcbjxBIrsI3zsPZgLGmgvdcvdKxd9YywtTSMhENUedWJRed lzpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=G5szt1P7; 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 f136si7862687oig.9.2020.03.14.18.55.54; Sat, 14 Mar 2020 18:56:05 -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=fail header.i=@lunn.ch header.s=20171124 header.b=G5szt1P7; 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 S1727662AbgCOBya (ORCPT + 99 others); Sat, 14 Mar 2020 21:54:30 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:36040 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbgCOBy2 (ORCPT ); Sat, 14 Mar 2020 21:54:28 -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: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=NL3MJouei4eDxbtXys1XmSE5zsmrHAunj/d9XtHq32s=; b=G5szt1P7X8/ZbWY5RtsxzdhZQQ FAgcpi+1hAXENYjjox6ZLVeHuUrmbkQiky5pSrHj7lZs3bFyKv0AceSFMBk833fGX1CPfVoh9mj49 psBPAjJDhJrAgfqjaAWG1m+7bFdjDfsETwSdUxnfe4MuZWSZ6NTPOh0bHe1gK2v+in0I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jDE8X-0002J5-M9; Sat, 14 Mar 2020 22:16:01 +0100 Date: Sat, 14 Mar 2020 22:16:01 +0100 From: Andrew Lunn To: Madalin Bucur Cc: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org, shawnguo@kernel.org, leoyang.li@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 1/3] net: fsl/fman: treat all RGMII modes in memac_adjust_link() Message-ID: <20200314211601.GA8622@lunn.ch> References: <1584101065-3482-1-git-send-email-madalin.bucur@oss.nxp.com> <1584101065-3482-2-git-send-email-madalin.bucur@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584101065-3482-2-git-send-email-madalin.bucur@oss.nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2020 at 02:04:23PM +0200, Madalin Bucur wrote: > Treat all internal delay variants the same as RGMII. > > Signed-off-by: Madalin Bucur > --- > drivers/net/ethernet/freescale/fman/fman_memac.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c > index e1901874c19f..0fc98584974a 100644 > --- a/drivers/net/ethernet/freescale/fman/fman_memac.c > +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c > @@ -782,7 +782,10 @@ int memac_adjust_link(struct fman_mac *memac, u16 speed) > /* Set full duplex */ > tmp &= ~IF_MODE_HD; > > - if (memac->phy_if == PHY_INTERFACE_MODE_RGMII) { > + if (memac->phy_if == PHY_INTERFACE_MODE_RGMII || > + memac->phy_if == PHY_INTERFACE_MODE_RGMII_ID || > + memac->phy_if == PHY_INTERFACE_MODE_RGMII_RXID || > + memac->phy_if == PHY_INTERFACE_MODE_RGMII_TXID) { Hi Madalin You can use phy_interface_mode_is_rgmii() Andrew