Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685844

Re: [PATCH net-next 3/4] net-next: mediatek: add support for MediaTek MT7622 SoC

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next 3/4] net-next: mediatek: add support for MediaTek MT7622 SoC
Date 2017-07-12 17:10 +0200
Message-ID <u2rr5-1qK-41@gated-at.bofh.it> (permalink)
References <u2gFj-2Ld-3@gated-at.bofh.it> <u2gFj-2Ld-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Sean

>  static void mtk_phy_link_adjust(struct net_device *dev)
>  {
>  	struct mtk_mac *mac = netdev_priv(dev);
> @@ -269,6 +311,7 @@ static int mtk_phy_connect(struct net_device *dev)
>  	if (!np)
>  		return -ENODEV;
>  
> +	mac->ge_mode = 0;
>  	switch (of_get_phy_mode(np)) {
>  	case PHY_INTERFACE_MODE_TRGMII:
>  		mac->trgmii = true;
> @@ -276,7 +319,15 @@ static int mtk_phy_connect(struct net_device *dev)
>  	case PHY_INTERFACE_MODE_RGMII_RXID:
>  	case PHY_INTERFACE_MODE_RGMII_ID:
>  	case PHY_INTERFACE_MODE_RGMII:
> -		mac->ge_mode = 0;
> +		break;
> +	case PHY_INTERFACE_MODE_SGMII:
> +		if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII))
> +			mtk_gmac_sgmii_hw_setup(eth, mac->id);
> +		break;

> +	case PHY_INTERFACE_MODE_INTERNAL:
> +		if (MTK_HAS_CAPS(eth->soc->caps, MTK_GMAC1_ESW) && !mac->id)
> +			/* Setup the path through ESW internal switch */
> +			mtk_w32(eth, MTK_MUX_TO_ESW, MTK_MAC_MISC);

This bit is interesting. Generally, there is no PHY at all between the
MAC and the switch. So i don't think this is correct. Please can you
take this out for the moment, until you actually add support for the
switch. We can discuss it then, when we see the bigger picture.

	Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 0/4] net-next: mediatek: add support for ethernet on MT7622 SoC <sean.wang@mediatek.com> - 2017-07-12 05:40 +0200
  [PATCH net-next 4/4] MAINTAINERS: add Sean/Nelson as MediaTek ethernet maintainers <sean.wang@mediatek.com> - 2017-07-12 05:40 +0200
  [PATCH net-next 3/4] net-next: mediatek: add support for MediaTek MT7622 SoC <sean.wang@mediatek.com> - 2017-07-12 05:40 +0200
    Re: [PATCH net-next 3/4] net-next: mediatek: add support for  MediaTek MT7622 SoC Andrew Lunn <andrew@lunn.ch> - 2017-07-12 17:10 +0200
  Re: [PATCH net-next 0/4] net-next: mediatek: add support for  ethernet on MT7622 SoC David Miller <davem@davemloft.net> - 2017-07-12 06:00 +0200

csiph-web