diff options
| author | David S. Miller <[email protected]> | 2021-12-14 12:45:16 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-12-14 12:45:16 +0000 |
| commit | 256f8d72a51e77d1eaab6094a3d6ae4978d1dbd0 (patch) | |
| tree | 86b5c674b1e58aef7d77b5b598831b61516e0c4f /include | |
| parent | b4bffa4ceab1be0e4cc39aa56c0746a63e5d3c6f (diff) | |
| parent | 7f2973149c22e7a6fee4c0c9fa6b8e4108e9c208 (diff) | |
Merge branch 'dsa-fixups'
Vladimir Oltean says:
====================
DSA tagger-owned storage fixups
It seems that the DSA tagger-owned storage changes were insufficiently
tested and do not work in all cases. Specifically, the NXP Bluebox 3
(arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dts) got broken by
these changes, because
(a) I forgot that DSA_TAG_PROTO_SJA1110 exists and differs from
DSA_TAG_PROTO_SJA1105
(b) the Bluebox 3 uses a DSA switch tree with 2 switches, and the
tagger-owned storage patches don't cover that use case well, it
seems
Therefore, I'm sorry to say that there needs to be an API fixup: tagging
protocol drivers will from now on connect to individual switches from a
tree, rather than to the tree as a whole. This is more robust against
various ordering constraints in the DSA probe and teardown paths, and is
also symmetrical with the connection API exposed to the switch drivers
themselves, which is also per switch.
With these changes, the Bluebox 3 also works fine.
====================
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/dsa/sja1105.h | 3 | ||||
| -rw-r--r-- | include/net/dsa.h | 5 |
2 files changed, 4 insertions, 4 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; } diff --git a/include/net/dsa.h b/include/net/dsa.h index 64d71968aa91..f16959444ae1 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -82,15 +82,14 @@ enum dsa_tag_protocol { }; struct dsa_switch; -struct dsa_switch_tree; struct dsa_device_ops { struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev); struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev); void (*flow_dissect)(const struct sk_buff *skb, __be16 *proto, int *offset); - int (*connect)(struct dsa_switch_tree *dst); - void (*disconnect)(struct dsa_switch_tree *dst); + int (*connect)(struct dsa_switch *ds); + void (*disconnect)(struct dsa_switch *ds); unsigned int needed_headroom; unsigned int needed_tailroom; const char *name; |