summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-12-14 03:45:35 +0200
committerVladimir Oltean <vladimir.oltean@nxp.com>2022-05-04 15:24:51 +0200
commit5a796e52057fbd174f7d77ab899502829af2bc37 (patch)
tree7bae871930cabd651f8799c5aa3163974426c062 /include
parentc2921f6ac29fabba3340e4783f1fa4491d7c9823 (diff)
net: dsa: sja1105: fix broken connection with the sja1110 tagger
The driver was incorrectly converted assuming that "sja1105" is the only tagger supported by this driver. This results in SJA1110 switches failing to probe: sja1105 spi1.0: Unable to connect to tag protocol "sja1110": -EPROTONOSUPPORT sja1105: probe of spi1.2 failed with error -93 Add DSA_TAG_PROTO_SJA1110 to the list of supported taggers by the sja1105 driver. The sja1105_tagger_data structure format is common for the two tagging protocols. Fixes: c79e84866d2a ("net: dsa: tag_sja1105: convert to tagger-owned data") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit c8a2a011cd04054a6577d8cf774adf9e09302876) Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dsa/sja1105.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dsa/sja1105.h b/include/linux/dsa/sja1105.h
index e9cb1ae6d742..159e43171ccc 100644
--- a/include/linux/dsa/sja1105.h
+++ b/include/linux/dsa/sja1105.h
@@ -70,7 +70,8 @@ struct sja1105_skb_cb {
static inline struct sja1105_tagger_data *
sja1105_tagger_data(struct dsa_switch *ds)
{
- BUG_ON(ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1105);
+ BUG_ON(ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1105 &&
+ ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1110);
return ds->tagger_data;
}