diff options
author | Niklas Cassel <niklas.cassel@axis.com> | 2016-12-07 15:41:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-08 19:35:37 +0300 |
commit | 7cc99fd29b982964e63afa92a7e29db49b69c90e (patch) | |
tree | 47a4398659543cd0c6a3ceaf1d6a33be1aa09462 /net/sched/cls_flower.c | |
parent | 4966a692d055c97f83a17da6035e93806b407473 (diff) | |
download | linux-7cc99fd29b982964e63afa92a7e29db49b69c90e.tar.xz |
net: stmmac: stmmac_platform: use correct setup function for gmac4
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_flower.c')
0 files changed, 0 insertions, 0 deletions