net: dsa: b53: support legacy tags
These tags are used on BCM5325, BCM5365 and BCM63xx switches. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
964dbf186e
Коммит
46c5176c58
|
@ -3,6 +3,7 @@ menuconfig B53
|
||||||
tristate "Broadcom BCM53xx managed switch support"
|
tristate "Broadcom BCM53xx managed switch support"
|
||||||
depends on NET_DSA
|
depends on NET_DSA
|
||||||
select NET_DSA_TAG_BRCM
|
select NET_DSA_TAG_BRCM
|
||||||
|
select NET_DSA_TAG_BRCM_LEGACY
|
||||||
select NET_DSA_TAG_BRCM_PREPEND
|
select NET_DSA_TAG_BRCM_PREPEND
|
||||||
help
|
help
|
||||||
This driver adds support for Broadcom managed switch chips. It supports
|
This driver adds support for Broadcom managed switch chips. It supports
|
||||||
|
|
|
@ -2055,15 +2055,17 @@ enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port,
|
||||||
{
|
{
|
||||||
struct b53_device *dev = ds->priv;
|
struct b53_device *dev = ds->priv;
|
||||||
|
|
||||||
/* Older models (5325, 5365) support a different tag format that we do
|
if (!b53_can_enable_brcm_tags(ds, port, mprot)) {
|
||||||
* not support in net/dsa/tag_brcm.c yet.
|
|
||||||
*/
|
|
||||||
if (is5325(dev) || is5365(dev) ||
|
|
||||||
!b53_can_enable_brcm_tags(ds, port, mprot)) {
|
|
||||||
dev->tag_protocol = DSA_TAG_PROTO_NONE;
|
dev->tag_protocol = DSA_TAG_PROTO_NONE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Older models require a different 6 byte tag */
|
||||||
|
if (is5325(dev) || is5365(dev) || is63xx(dev)) {
|
||||||
|
dev->tag_protocol = DSA_TAG_PROTO_BRCM_LEGACY;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* Broadcom BCM58xx chips have a flow accelerator on Port 8
|
/* Broadcom BCM58xx chips have a flow accelerator on Port 8
|
||||||
* which requires us to use the prepended Broadcom tag type
|
* which requires us to use the prepended Broadcom tag type
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче