tristate "Broadcom BCM53xx managed switch support"
depends on NET_DSA
select NET_DSA_TAG_BRCM
+ select NET_DSA_TAG_BRCM_PREPEND
help
This driver adds support for Broadcom managed switch chips. It supports
BCM5325E, BCM5365, BCM539x, BCM53115 and BCM53125 as well as BCM63XX
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port)
{
- bool tag_en = !!(ds->ops->get_tag_protocol(ds, port) ==
- DSA_TAG_PROTO_BRCM);
+ bool tag_en = !(ds->ops->get_tag_protocol(ds, port) ==
+ DSA_TAG_PROTO_NONE);
struct b53_device *dev = ds->priv;
u8 hdr_ctl, val;
u16 reg;
*/
if (is5325(dev) || is5365(dev) || !b53_can_enable_brcm_tags(ds, port))
return DSA_TAG_PROTO_NONE;
- else
- return DSA_TAG_PROTO_BRCM;
+
+ /* Broadcom BCM58xx chips have a flow accelerator on Port 8
+ * which requires us to use the prepended Broadcom tag type
+ */
+ if (dev->chip_id == BCM58XX_DEVICE_ID && port == B53_CPU_PORT)
+ return DSA_TAG_PROTO_BRCM_PREPEND;
+
+ return DSA_TAG_PROTO_BRCM;
}
int b53_mirror_add(struct dsa_switch *ds, int port,