Lines Matching +full:straight +full:- +full:forward

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
91 ret = hwreset_assert(sc->sc_ess_rst); in ar40xx_hw_ess_reset()
93 device_printf(sc->sc_dev, "ERROR: failed to assert reset\n"); in ar40xx_hw_ess_reset()
98 ret = hwreset_deassert(sc->sc_ess_rst); in ar40xx_hw_ess_reset()
100 device_printf(sc->sc_dev, in ar40xx_hw_ess_reset()
122 /* forward multicast and broadcast frames to CPU */ in ar40xx_hw_init_globals()
160 sc->sc_vlan.vlan = 1; in ar40xx_hw_vlan_init()
163 sc->sc_vlan.vlan_id[AR40XX_LAN_VLAN] = AR40XX_LAN_VLAN in ar40xx_hw_vlan_init()
165 sc->sc_vlan.vlan_id[AR40XX_WAN_VLAN] = AR40XX_WAN_VLAN in ar40xx_hw_vlan_init()
168 sc->sc_vlan.vlan_ports[AR40XX_LAN_VLAN] = in ar40xx_hw_vlan_init()
169 sc->sc_config.switch_cpu_bmp | sc->sc_config.switch_lan_bmp; in ar40xx_hw_vlan_init()
170 sc->sc_vlan.vlan_untagged[AR40XX_LAN_VLAN] = in ar40xx_hw_vlan_init()
171 sc->sc_config.switch_lan_bmp; in ar40xx_hw_vlan_init()
173 sc->sc_vlan.vlan_ports[AR40XX_WAN_VLAN] = in ar40xx_hw_vlan_init()
174 sc->sc_config.switch_cpu_bmp | sc->sc_config.switch_wan_bmp; in ar40xx_hw_vlan_init()
175 sc->sc_vlan.vlan_untagged[AR40XX_WAN_VLAN] = in ar40xx_hw_vlan_init()
176 sc->sc_config.switch_wan_bmp; in ar40xx_hw_vlan_init()
178 /* Populate the per-port PVID - pvid[] is an index into vlan_id[] */ in ar40xx_hw_vlan_init()
180 if (sc->sc_config.switch_lan_bmp & (1U << i)) in ar40xx_hw_vlan_init()
181 sc->sc_vlan.pvid[i] = AR40XX_LAN_VLAN; in ar40xx_hw_vlan_init()
182 if (sc->sc_config.switch_wan_bmp & (1U << i)) in ar40xx_hw_vlan_init()
183 sc->sc_vlan.pvid[i] = AR40XX_WAN_VLAN; in ar40xx_hw_vlan_init()
190 * Apply the per-port and global configuration from software.
209 device_printf(sc->sc_dev, in ar40xx_hw_sw_hw_apply()
219 * VLANs, or just straight up per-port VLANs. in ar40xx_hw_sw_hw_apply()
221 if (sc->sc_vlan.vlan) { in ar40xx_hw_sw_hw_apply()
222 device_printf(sc->sc_dev, "%s: configuring 802.1q VLANs\n", in ar40xx_hw_sw_hw_apply()
225 uint8_t vp = sc->sc_vlan.vlan_ports[j]; in ar40xx_hw_sw_hw_apply()
229 if ((sc->sc_vlan.vlan_id[j] in ar40xx_hw_sw_hw_apply()
241 sc->sc_vlan.vlan_id[j] & ETHERSWITCH_VID_MASK, in ar40xx_hw_sw_hw_apply()
242 sc->sc_vlan.vlan_ports[j], in ar40xx_hw_sw_hw_apply()
243 sc->sc_vlan.vlan_untagged[j]); in ar40xx_hw_sw_hw_apply()
246 device_printf(sc->sc_dev, "%s: configuring per-port VLANs\n", in ar40xx_hw_sw_hw_apply()
258 * Update per-port destination mask, vlan tag settings in ar40xx_hw_sw_hw_apply()
266 device_printf(sc->sc_dev, in ar40xx_hw_sw_hw_apply()
289 if (timeout-- <= 0) in ar40xx_hw_wait_bit()
295 device_printf(sc->sc_dev, "ERROR: timeout for reg " in ar40xx_hw_wait_bit()