felix.c (6b73b7c96a91689b8167b1f7da0e89b997af0736) | felix.c (a026c50b599fab8ad829f87af372866e229d8175) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright 2019-2021 NXP Semiconductors 3 * 4 * This is an umbrella module for all network switches that are 5 * register-compatible with Ocelot and that perform I/O to their host CPU 6 * through an NPI (Node Processor Interface) Ethernet port. 7 */ 8#include <uapi/linux/if_bridge.h> --- 1568 unchanged lines hidden (view full) --- 1577 u32 *p_cur, u32 *p_max) 1578{ 1579 struct ocelot *ocelot = ds->priv; 1580 1581 return ocelot_sb_occ_tc_port_bind_get(ocelot, port, sb_index, tc_index, 1582 pool_type, p_cur, p_max); 1583} 1584 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright 2019-2021 NXP Semiconductors 3 * 4 * This is an umbrella module for all network switches that are 5 * register-compatible with Ocelot and that perform I/O to their host CPU 6 * through an NPI (Node Processor Interface) Ethernet port. 7 */ 8#include <uapi/linux/if_bridge.h> --- 1568 unchanged lines hidden (view full) --- 1577 u32 *p_cur, u32 *p_max) 1578{ 1579 struct ocelot *ocelot = ds->priv; 1580 1581 return ocelot_sb_occ_tc_port_bind_get(ocelot, port, sb_index, tc_index, 1582 pool_type, p_cur, p_max); 1583} 1584 |
1585static int felix_mrp_add(struct dsa_switch *ds, int port, 1586 const struct switchdev_obj_mrp *mrp) 1587{ 1588 struct ocelot *ocelot = ds->priv; 1589 1590 return ocelot_mrp_add(ocelot, port, mrp); 1591} 1592 1593static int felix_mrp_del(struct dsa_switch *ds, int port, 1594 const struct switchdev_obj_mrp *mrp) 1595{ 1596 struct ocelot *ocelot = ds->priv; 1597 1598 return ocelot_mrp_add(ocelot, port, mrp); 1599} 1600 1601static int 1602felix_mrp_add_ring_role(struct dsa_switch *ds, int port, 1603 const struct switchdev_obj_ring_role_mrp *mrp) 1604{ 1605 struct ocelot *ocelot = ds->priv; 1606 1607 return ocelot_mrp_add_ring_role(ocelot, port, mrp); 1608} 1609 1610static int 1611felix_mrp_del_ring_role(struct dsa_switch *ds, int port, 1612 const struct switchdev_obj_ring_role_mrp *mrp) 1613{ 1614 struct ocelot *ocelot = ds->priv; 1615 1616 return ocelot_mrp_del_ring_role(ocelot, port, mrp); 1617} 1618 |
|
1585const struct dsa_switch_ops felix_switch_ops = { 1586 .get_tag_protocol = felix_get_tag_protocol, 1587 .change_tag_protocol = felix_change_tag_protocol, 1588 .setup = felix_setup, 1589 .teardown = felix_teardown, 1590 .set_ageing_time = felix_set_ageing_time, 1591 .get_strings = felix_get_strings, 1592 .get_ethtool_stats = felix_get_ethtool_stats, --- 38 unchanged lines hidden (view full) --- 1631 .devlink_sb_port_pool_get = felix_sb_port_pool_get, 1632 .devlink_sb_port_pool_set = felix_sb_port_pool_set, 1633 .devlink_sb_tc_pool_bind_get = felix_sb_tc_pool_bind_get, 1634 .devlink_sb_tc_pool_bind_set = felix_sb_tc_pool_bind_set, 1635 .devlink_sb_occ_snapshot = felix_sb_occ_snapshot, 1636 .devlink_sb_occ_max_clear = felix_sb_occ_max_clear, 1637 .devlink_sb_occ_port_pool_get = felix_sb_occ_port_pool_get, 1638 .devlink_sb_occ_tc_port_bind_get= felix_sb_occ_tc_port_bind_get, | 1619const struct dsa_switch_ops felix_switch_ops = { 1620 .get_tag_protocol = felix_get_tag_protocol, 1621 .change_tag_protocol = felix_change_tag_protocol, 1622 .setup = felix_setup, 1623 .teardown = felix_teardown, 1624 .set_ageing_time = felix_set_ageing_time, 1625 .get_strings = felix_get_strings, 1626 .get_ethtool_stats = felix_get_ethtool_stats, --- 38 unchanged lines hidden (view full) --- 1665 .devlink_sb_port_pool_get = felix_sb_port_pool_get, 1666 .devlink_sb_port_pool_set = felix_sb_port_pool_set, 1667 .devlink_sb_tc_pool_bind_get = felix_sb_tc_pool_bind_get, 1668 .devlink_sb_tc_pool_bind_set = felix_sb_tc_pool_bind_set, 1669 .devlink_sb_occ_snapshot = felix_sb_occ_snapshot, 1670 .devlink_sb_occ_max_clear = felix_sb_occ_max_clear, 1671 .devlink_sb_occ_port_pool_get = felix_sb_occ_port_pool_get, 1672 .devlink_sb_occ_tc_port_bind_get= felix_sb_occ_tc_port_bind_get, |
1673 .port_mrp_add = felix_mrp_add, 1674 .port_mrp_del = felix_mrp_del, 1675 .port_mrp_add_ring_role = felix_mrp_add_ring_role, 1676 .port_mrp_del_ring_role = felix_mrp_del_ring_role, |
|
1639}; 1640 1641struct net_device *felix_port_to_netdev(struct ocelot *ocelot, int port) 1642{ 1643 struct felix *felix = ocelot_to_felix(ocelot); 1644 struct dsa_switch *ds = felix->ds; 1645 1646 if (!dsa_is_user_port(ds, port)) --- 15 unchanged lines hidden --- | 1677}; 1678 1679struct net_device *felix_port_to_netdev(struct ocelot *ocelot, int port) 1680{ 1681 struct felix *felix = ocelot_to_felix(ocelot); 1682 struct dsa_switch *ds = felix->ds; 1683 1684 if (!dsa_is_user_port(ds, port)) --- 15 unchanged lines hidden --- |