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


Groups > linux.kernel > #1538716

Re: [RESEND PATCH 3/3] net: stmmac: stmmac_platform: use correct setup function for gmac4

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH 3/3] net: stmmac: stmmac_platform: use correct setup function for gmac4
Date 2016-12-08 17:40 +0100
Message-ID <sM9TI-8om-19@gated-at.bofh.it> (permalink)
References <sLJPz-a6-5@gated-at.bofh.it> <sLJPz-a6-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Niklas Cassel <niklas.cassel@axis.com>
Date: Wed, 7 Dec 2016 13:41:08 +0100

> From: Niklas Cassel <niklas.cassel@axis.com>
> 
> devicetree binding for stmmac states:
> - compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac"
> 	For backwards compatibility: "st,spear600-gmac" is also supported.
> 
> Previously, when specifying "snps,dwmac-4.10a", "snps,dwmac" as your
> compatible string, plat_stmmacenet_data would have both has_gmac and
> has_gmac4 set.
> 
> This would lead to stmmac_hw_init calling dwmac1000_setup rather than
> dwmac4_setup, resulting in a non-functional driver.
> This happened since the check for has_gmac is done before the check for
> has_gmac4. However, the order should not matter, so it does not make sense
> to have both set.
> 
> If something is valid for both, you should do as the stmmac_interrupt does:
> if (priv->plat->has_gmac || priv->plat->has_gmac4) ...
> 
> The places where it was obvious that the author actually meant
> if (has_gmac || has_gmac4) rather than if (has_gmac) has been updated.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
> Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>

Applied.

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


Thread

[RESEND PATCH 1/3] bindings: net: stmmac: correct note about TSO Niklas Cassel <niklas.cassel@axis.com> - 2016-12-07 13:50 +0100
  [RESEND PATCH 3/3] net: stmmac: stmmac_platform: use correct setup function for gmac4 Niklas Cassel <niklas.cassel@axis.com> - 2016-12-07 13:50 +0100
    Re: [RESEND PATCH 3/3] net: stmmac: stmmac_platform: use correct  setup function for gmac4 David Miller <davem@davemloft.net> - 2016-12-08 17:40 +0100
  [RESEND PATCH 2/3] net: stmmac: dwmac-generic: add missing compatible strings Niklas Cassel <niklas.cassel@axis.com> - 2016-12-07 13:50 +0100
    Re: [RESEND PATCH 2/3] net: stmmac: dwmac-generic: add missing  compatible strings David Miller <davem@davemloft.net> - 2016-12-08 17:40 +0100
  Re: [RESEND PATCH 1/3] bindings: net: stmmac: correct note about  TSO David Miller <davem@davemloft.net> - 2016-12-08 17:40 +0100

csiph-web