felix.c (79fda660bdbba839f434cf8674ff4a20d88fbeb2) | felix.c (864ba485ac52eaf426992e5fd4bec50b7ea107b4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright 2019-2021 NXP 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> --- 784 unchanged lines hidden (view full) --- 793{ 794 struct ocelot *ocelot = ds->priv; 795 struct felix *felix = ocelot_to_felix(ocelot); 796 797 if (felix->info->phylink_validate) 798 felix->info->phylink_validate(ocelot, port, supported, state); 799} 800 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright 2019-2021 NXP 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> --- 784 unchanged lines hidden (view full) --- 793{ 794 struct ocelot *ocelot = ds->priv; 795 struct felix *felix = ocelot_to_felix(ocelot); 796 797 if (felix->info->phylink_validate) 798 felix->info->phylink_validate(ocelot, port, supported, state); 799} 800 |
801static void felix_phylink_mac_config(struct dsa_switch *ds, int port, 802 unsigned int link_an_mode, 803 const struct phylink_link_state *state) | 801static struct phylink_pcs *felix_phylink_mac_select_pcs(struct dsa_switch *ds, 802 int port, 803 phy_interface_t iface) |
804{ 805 struct ocelot *ocelot = ds->priv; 806 struct felix *felix = ocelot_to_felix(ocelot); | 804{ 805 struct ocelot *ocelot = ds->priv; 806 struct felix *felix = ocelot_to_felix(ocelot); |
807 struct dsa_port *dp = dsa_to_port(ds, port); | 807 struct phylink_pcs *pcs = NULL; |
808 809 if (felix->pcs && felix->pcs[port]) | 808 809 if (felix->pcs && felix->pcs[port]) |
810 phylink_set_pcs(dp->pl, felix->pcs[port]); | 810 pcs = felix->pcs[port]; 811 812 return pcs; |
811} 812 813static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port, 814 unsigned int link_an_mode, 815 phy_interface_t interface) 816{ 817 struct ocelot *ocelot = ds->priv; 818 --- 774 unchanged lines hidden (view full) --- 1593 .teardown = felix_teardown, 1594 .set_ageing_time = felix_set_ageing_time, 1595 .get_strings = felix_get_strings, 1596 .get_ethtool_stats = felix_get_ethtool_stats, 1597 .get_sset_count = felix_get_sset_count, 1598 .get_ts_info = felix_get_ts_info, 1599 .phylink_get_caps = felix_phylink_get_caps, 1600 .phylink_validate = felix_phylink_validate, | 813} 814 815static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port, 816 unsigned int link_an_mode, 817 phy_interface_t interface) 818{ 819 struct ocelot *ocelot = ds->priv; 820 --- 774 unchanged lines hidden (view full) --- 1595 .teardown = felix_teardown, 1596 .set_ageing_time = felix_set_ageing_time, 1597 .get_strings = felix_get_strings, 1598 .get_ethtool_stats = felix_get_ethtool_stats, 1599 .get_sset_count = felix_get_sset_count, 1600 .get_ts_info = felix_get_ts_info, 1601 .phylink_get_caps = felix_phylink_get_caps, 1602 .phylink_validate = felix_phylink_validate, |
1601 .phylink_mac_config = felix_phylink_mac_config, | 1603 .phylink_mac_select_pcs = felix_phylink_mac_select_pcs, |
1602 .phylink_mac_link_down = felix_phylink_mac_link_down, 1603 .phylink_mac_link_up = felix_phylink_mac_link_up, 1604 .port_fast_age = felix_port_fast_age, 1605 .port_fdb_dump = felix_fdb_dump, 1606 .port_fdb_add = felix_fdb_add, 1607 .port_fdb_del = felix_fdb_del, 1608 .lag_fdb_add = felix_lag_fdb_add, 1609 .lag_fdb_del = felix_lag_fdb_del, --- 64 unchanged lines hidden --- | 1604 .phylink_mac_link_down = felix_phylink_mac_link_down, 1605 .phylink_mac_link_up = felix_phylink_mac_link_up, 1606 .port_fast_age = felix_port_fast_age, 1607 .port_fdb_dump = felix_fdb_dump, 1608 .port_fdb_add = felix_fdb_add, 1609 .port_fdb_del = felix_fdb_del, 1610 .lag_fdb_add = felix_lag_fdb_add, 1611 .lag_fdb_del = felix_lag_fdb_del, --- 64 unchanged lines hidden --- |