Commit c631250a authored by Oleksij Rempel's avatar Oleksij Rempel Committed by David S. Miller

net: dsa: microchip: enable ETS support for KSZ989X variants

I tested ETS support on KSZ9893, so it should work other KSZ989X
variants too, which was till not listed as support.

With this change we now officially not support only ksz8 family of
chips.
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Acked-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a1ea5771
...@@ -1228,7 +1228,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1228,7 +1228,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 4, .num_tx_queues = 4,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &ksz9477_dev_ops, .ops = &ksz9477_dev_ops,
.phylink_mac_ops = &ksz9477_phylink_mac_ops, .phylink_mac_ops = &ksz9477_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1380,7 +1379,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1380,7 +1379,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 4, .num_tx_queues = 4,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &ksz9477_dev_ops, .ops = &ksz9477_dev_ops,
.phylink_mac_ops = &ksz9477_phylink_mac_ops, .phylink_mac_ops = &ksz9477_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1510,7 +1508,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1510,7 +1508,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 4, .num_tx_queues = 4,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &ksz9477_dev_ops, .ops = &ksz9477_dev_ops,
.phylink_mac_ops = &ksz9477_phylink_mac_ops, .phylink_mac_ops = &ksz9477_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1540,7 +1537,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1540,7 +1537,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 4, .num_tx_queues = 4,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &ksz9477_dev_ops, .ops = &ksz9477_dev_ops,
.phylink_mac_ops = &ksz9477_phylink_mac_ops, .phylink_mac_ops = &ksz9477_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1575,7 +1571,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1575,7 +1571,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 4, .num_tx_queues = 4,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &ksz9477_dev_ops, .ops = &ksz9477_dev_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
.mib_cnt = ARRAY_SIZE(ksz9477_mib_names), .mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
...@@ -1608,7 +1603,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1608,7 +1603,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 8, .num_tx_queues = 8,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &lan937x_dev_ops, .ops = &lan937x_dev_ops,
.phylink_mac_ops = &lan937x_phylink_mac_ops, .phylink_mac_ops = &lan937x_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1637,7 +1631,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1637,7 +1631,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 8, .num_tx_queues = 8,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &lan937x_dev_ops, .ops = &lan937x_dev_ops,
.phylink_mac_ops = &lan937x_phylink_mac_ops, .phylink_mac_ops = &lan937x_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1666,7 +1659,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1666,7 +1659,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 8, .num_tx_queues = 8,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &lan937x_dev_ops, .ops = &lan937x_dev_ops,
.phylink_mac_ops = &lan937x_phylink_mac_ops, .phylink_mac_ops = &lan937x_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1699,7 +1691,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1699,7 +1691,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 8, .num_tx_queues = 8,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &lan937x_dev_ops, .ops = &lan937x_dev_ops,
.phylink_mac_ops = &lan937x_phylink_mac_ops, .phylink_mac_ops = &lan937x_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -1732,7 +1723,6 @@ const struct ksz_chip_data ksz_switch_chips[] = { ...@@ -1732,7 +1723,6 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.num_tx_queues = 8, .num_tx_queues = 8,
.num_ipvs = 8, .num_ipvs = 8,
.tc_cbs_supported = true, .tc_cbs_supported = true,
.tc_ets_supported = true,
.ops = &lan937x_dev_ops, .ops = &lan937x_dev_ops,
.phylink_mac_ops = &lan937x_phylink_mac_ops, .phylink_mac_ops = &lan937x_phylink_mac_ops,
.mib_names = ksz9477_mib_names, .mib_names = ksz9477_mib_names,
...@@ -3681,7 +3671,7 @@ static int ksz_tc_setup_qdisc_ets(struct dsa_switch *ds, int port, ...@@ -3681,7 +3671,7 @@ static int ksz_tc_setup_qdisc_ets(struct dsa_switch *ds, int port,
struct ksz_device *dev = ds->priv; struct ksz_device *dev = ds->priv;
int ret; int ret;
if (!dev->info->tc_ets_supported) if (is_ksz8(dev))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (qopt->parent != TC_H_ROOT) { if (qopt->parent != TC_H_ROOT) {
......
...@@ -64,7 +64,6 @@ struct ksz_chip_data { ...@@ -64,7 +64,6 @@ struct ksz_chip_data {
u8 num_tx_queues; u8 num_tx_queues;
u8 num_ipvs; /* number of Internal Priority Values */ u8 num_ipvs; /* number of Internal Priority Values */
bool tc_cbs_supported; bool tc_cbs_supported;
bool tc_ets_supported;
const struct ksz_dev_ops *ops; const struct ksz_dev_ops *ops;
const struct phylink_mac_ops *phylink_mac_ops; const struct phylink_mac_ops *phylink_mac_ops;
bool ksz87xx_eee_link_erratum; bool ksz87xx_eee_link_erratum;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment