| /drivers/net/ethernet/microchip/lan966x/ |
| A D | lan966x_vlan.c | 111 return port->vlan_aware ? port->pvid : UNAWARE_PVID; in lan966x_vlan_port_get_pvid() 115 bool pvid, bool untagged) in lan966x_vlan_port_set_vid() argument 131 if (pvid) in lan966x_vlan_port_set_vid() 132 port->pvid = vid; in lan966x_vlan_port_set_vid() 139 if (port->pvid == vid) in lan966x_vlan_port_remove_vid() 140 port->pvid = 0; in lan966x_vlan_port_remove_vid() 176 u16 pvid; in lan966x_vlan_port_apply() local 179 pvid = lan966x_vlan_port_get_pvid(port); in lan966x_vlan_port_apply() 183 val = ANA_VLAN_CFG_VLAN_VID_SET(pvid); in lan966x_vlan_port_apply() 201 if (port->vlan_aware && !pvid) in lan966x_vlan_port_apply() [all …]
|
| A D | lan966x_main.h | 398 u16 pvid; member 503 bool pvid, 507 bool pvid,
|
| /drivers/net/ethernet/ti/ |
| A D | cpsw_switchdev.c | 123 u32 pvid; in cpsw_get_pvid() local 133 pvid = readl(port_vlan_reg); in cpsw_get_pvid() 136 pvid = pvid & 0xfff; in cpsw_get_pvid() 138 return pvid; in cpsw_get_pvid() 145 u32 pvid; in cpsw_set_pvid() local 147 pvid = vid; in cpsw_set_pvid() 148 pvid |= cfi ? BIT(12) : 0; in cpsw_set_pvid() 149 pvid |= (cos & 0x7) << 13; in cpsw_set_pvid() 161 writel(pvid, port_vlan_reg); in cpsw_set_pvid() 202 if (!pvid) in cpsw_port_vlan_add() [all …]
|
| A D | am65-cpsw-switchdev.c | 121 u32 pvid; in am65_cpsw_get_pvid() local 124 pvid = readl(port->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET); in am65_cpsw_get_pvid() 128 pvid = pvid & 0xfff; in am65_cpsw_get_pvid() 130 return pvid; in am65_cpsw_get_pvid() 137 u32 pvid; in am65_cpsw_set_pvid() local 139 pvid = vid; in am65_cpsw_set_pvid() 140 pvid |= cfi ? BIT(12) : 0; in am65_cpsw_set_pvid() 141 pvid |= (cos & 0x7) << 13; in am65_cpsw_set_pvid() 144 writel(pvid, port->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET); in am65_cpsw_set_pvid() 186 if (!pvid) in am65_cpsw_port_vlan_add() [all …]
|
| /drivers/net/dsa/ |
| A D | dsa_loop.c | 208 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in dsa_loop_port_vlan_add() local 228 __func__, port, vlan->vid, untagged ? "un" : "", pvid); in dsa_loop_port_vlan_add() 230 if (pvid) in dsa_loop_port_vlan_add() 231 ps->ports[port].pvid = vlan->vid; in dsa_loop_port_vlan_add() 241 u16 pvid = ps->ports[port].pvid; in dsa_loop_port_vlan_del() local 254 if (pvid == vlan->vid) in dsa_loop_port_vlan_del() 255 pvid = 1; in dsa_loop_port_vlan_del() 258 __func__, port, vlan->vid, untagged ? "un" : "", pvid); in dsa_loop_port_vlan_del() 259 ps->ports[port].pvid = pvid; in dsa_loop_port_vlan_del()
|
| A D | lantiq_gswip.c | 1023 bool pvid) in gswip_vlan_add_aware() argument 1090 if (pvid) in gswip_vlan_add_aware() 1098 u16 vid, bool pvid, bool vlan_aware) in gswip_vlan_remove() argument 1148 if (pvid) in gswip_vlan_remove() 1245 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in gswip_port_vlan_add() local 1261 untagged, pvid); in gswip_port_vlan_add() 1269 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in gswip_port_vlan_del() local 1279 return gswip_vlan_remove(priv, bridge, port, vlan->vid, pvid, true); in gswip_port_vlan_del()
|
| /drivers/net/ethernet/microchip/sparx5/ |
| A D | sparx5_vlan.c | 50 ANA_CL_VLAN_CTRL_PORT_VID_SET(port->pvid), in sparx5_vlan_port_setup() 57 int sparx5_vlan_vid_add(struct sparx5_port *port, u16 vid, bool pvid, in sparx5_vlan_vid_add() argument 81 if (pvid) in sparx5_vlan_vid_add() 82 port->pvid = vid; in sparx5_vlan_vid_add() 108 if (port->pvid == vid) in sparx5_vlan_vid_del() 109 port->pvid = 0; in sparx5_vlan_vid_del() 223 ANA_CL_VLAN_CTRL_PORT_VID_SET(port->pvid); in sparx5_vlan_port_apply() 227 if (port->vlan_aware && !port->pvid) in sparx5_vlan_port_apply()
|
| A D | sparx5_switchdev.c | 158 if (port->pvid == 0) in sparx5_port_attr_set() 159 port->pvid = 1; in sparx5_port_attr_set() 228 port->pvid = NULL_VID; in sparx5_port_bridge_leave() 265 u16 vid = port->pvid; in sparx5_port_add_addr()
|
| A D | sparx5_netdev.c | 197 sparx5_mact_forget(sparx5, dev->dev_addr, port->pvid); in sparx5_set_mac_address() 201 addr->sa_data, port->pvid); in sparx5_set_mac_address()
|
| /drivers/net/ethernet/ti/icssg/ |
| A D | icssg_config.c | 806 u32 pvid; in icssg_get_pvid() local 809 pvid = readl(prueth->shram.va + EMAC_ICSSG_SWITCH_PORT1_DEFAULT_VLAN_OFFSET); in icssg_get_pvid() 811 pvid = readl(prueth->shram.va + EMAC_ICSSG_SWITCH_PORT2_DEFAULT_VLAN_OFFSET); in icssg_get_pvid() 813 pvid = pvid >> 24; in icssg_get_pvid() 815 return pvid; in icssg_get_pvid() 821 u32 pvid; in icssg_set_pvid() local 824 pvid = (u32 __force)cpu_to_be32((ETH_P_8021Q << 16) | (vid & 0xff)); in icssg_set_pvid() 827 writel(pvid, prueth->shram.va + EMAC_ICSSG_SWITCH_PORT1_DEFAULT_VLAN_OFFSET); in icssg_set_pvid() 829 writel(pvid, prueth->shram.va + EMAC_ICSSG_SWITCH_PORT2_DEFAULT_VLAN_OFFSET); in icssg_set_pvid() 831 writel(pvid, prueth->shram.va + EMAC_ICSSG_SWITCH_PORT0_DEFAULT_VLAN_OFFSET); in icssg_set_pvid()
|
| A D | icssg_switchdev.c | 230 static int prueth_switchdev_vlan_add(struct prueth_emac *emac, bool untag, bool pvid, in prueth_switchdev_vlan_add() argument 249 vid, port_mask, untag_mask, pvid); in prueth_switchdev_vlan_add() 251 if (!pvid) in prueth_switchdev_vlan_add() 292 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in prueth_switchdev_vlans_add() local 303 return prueth_switchdev_vlan_add(emac, untag, pvid, vlan->vid, in prueth_switchdev_vlans_add()
|
| /drivers/net/dsa/b53/ |
| A D | b53_common.c | 1263 u16 pvid; in b53_setup() local 1288 vl = &dev->vlans[pvid]; in b53_setup() 1695 if (pvid) in b53_vlan_add() 1736 u16 pvid; in b53_vlan_del() local 1741 pvid = dev->ports[port].pvid; in b53_vlan_del() 1747 if (pvid == vlan->vid) in b53_vlan_del() 1749 dev->ports[port].pvid = pvid; in b53_vlan_del() 2155 u16 pvlan, reg, pvid; in b53_br_join() local 2165 vl = &dev->vlans[pvid]; in b53_br_join() 2222 u16 pvlan, reg, pvid; in b53_br_leave() local [all …]
|
| /drivers/net/ethernet/intel/ice/ |
| A D | ice_eswitch_br.c | 612 struct ice_vlan port_vlan = ICE_VLAN(ETH_P_8021Q, port->pvid, 0); in ice_eswitch_br_clear_pvid() 622 port->pvid = 0; in ice_eswitch_br_clear_pvid() 640 if (port->pvid == vlan->vid) in ice_eswitch_br_vlan_cleanup() 663 if (port->pvid == vlan->vid || vlan->vid == 1) in ice_eswitch_br_set_pvid() 670 if (port->pvid) { in ice_eswitch_br_set_pvid() 673 port->vsi_idx, port->pvid); in ice_eswitch_br_set_pvid() 689 port->pvid = vlan->vid; in ice_eswitch_br_set_pvid() 728 if (port->pvid) in ice_eswitch_br_vlan_create() 746 if (port->pvid) { in ice_eswitch_br_port_vlan_add() 749 port->vsi_idx, port->pvid); in ice_eswitch_br_port_vlan_add()
|
| A D | ice_eswitch_br.h | 48 u16 pvid; member
|
| /drivers/net/ethernet/marvell/prestera/ |
| A D | prestera_switchdev.c | 1407 u16 old_pvid = port->pvid; in prestera_bridge_port_vlan_add() 1408 u16 pvid; in prestera_bridge_port_vlan_add() local 1412 pvid = vid; in prestera_bridge_port_vlan_add() 1414 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_add() 1430 err = prestera_port_pvid_set(port, pvid); in prestera_bridge_port_vlan_add() 1454 u16 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_del() local 1462 prestera_port_pvid_set(port, pvid); in prestera_bridge_port_vlan_del()
|
| /drivers/net/dsa/realtek/ |
| A D | rtl8366-core.c | 300 bool pvid = !!(vlan->flags & BRIDGE_VLAN_INFO_PVID); in rtl8366_vlan_add() local 323 pvid ? "PVID" : "no PVID"); in rtl8366_vlan_add() 336 if (!pvid) in rtl8366_vlan_add()
|
| /drivers/net/dsa/sja1105/ |
| A D | sja1105_main.c | 109 if (mac[port].vlanid == pvid) in sja1105_pvid_apply() 112 mac[port].vlanid = pvid; in sja1105_pvid_apply() 126 u16 pvid; in sja1105_commit_pvid() local 129 pvid = priv->bridge_pvid[port]; in sja1105_commit_pvid() 131 pvid = priv->tag_8021q_pvid[port]; in sja1105_commit_pvid() 133 rc = sja1105_pvid_apply(priv, port, pvid); in sja1105_commit_pvid() 144 if (pvid == priv->bridge_pvid[port]) { in sja1105_commit_pvid() 464 struct sja1105_vlan_lookup_entry pvid = { in sja1105_init_static_vlan() local 494 pvid.vmemb_port |= BIT(port); in sja1105_init_static_vlan() 495 pvid.vlan_bc |= BIT(port); in sja1105_init_static_vlan() [all …]
|
| /drivers/net/dsa/microchip/ |
| A D | ksz9477.c | 689 u16 pvid; in ksz9477_port_vlan_del() local 691 ksz_pread16(dev, port, REG_PORT_DEFAULT_VID, &pvid); in ksz9477_port_vlan_del() 692 pvid = pvid & 0xFFF; in ksz9477_port_vlan_del() 701 if (pvid == vlan->vid) in ksz9477_port_vlan_del() 702 pvid = 1; in ksz9477_port_vlan_del() 712 ksz_pwrite16(dev, port, REG_PORT_DEFAULT_VID, pvid); in ksz9477_port_vlan_del()
|
| /drivers/net/dsa/hirschmann/ |
| A D | hellcreek.c | 151 bool pvid) in hellcreek_select_vlan() argument 156 if (pvid) in hellcreek_select_vlan() 403 bool pvid, bool untagged) in hellcreek_apply_vlan() argument 409 port, vid, pvid, untagged); in hellcreek_apply_vlan() 414 hellcreek_select_vlan(hellcreek, vid, pvid); in hellcreek_apply_vlan() 460 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in hellcreek_vlan_add() local 470 pvid ? "PVID" : "no PVID"); in hellcreek_vlan_add() 472 hellcreek_apply_vlan(hellcreek, port, vlan->vid, pvid, untagged); in hellcreek_vlan_add()
|
| /drivers/net/ethernet/intel/fm10k/ |
| A D | fm10k_iov.c | 383 s32 fm10k_iov_update_pvid(struct fm10k_intfc *interface, u16 glort, u16 pvid) in fm10k_iov_update_pvid() argument 400 if (vf_info->sw_vid != pvid) { in fm10k_iov_update_pvid() 401 vf_info->sw_vid = pvid; in fm10k_iov_update_pvid()
|
| /drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
| A D | hclge_debugfs.h | 119 u16 pvid; member
|
| /drivers/net/dsa/mv88e6xxx/ |
| A D | port.c | 1103 int mv88e6xxx_port_get_pvid(struct mv88e6xxx_chip *chip, int port, u16 *pvid) in mv88e6xxx_port_get_pvid() argument 1113 *pvid = reg & MV88E6XXX_PORT_DEFAULT_VLAN_MASK; in mv88e6xxx_port_get_pvid() 1118 int mv88e6xxx_port_set_pvid(struct mv88e6xxx_chip *chip, int port, u16 pvid) in mv88e6xxx_port_set_pvid() argument 1129 reg |= pvid & MV88E6XXX_PORT_DEFAULT_VLAN_MASK; in mv88e6xxx_port_set_pvid() 1136 dev_dbg(chip->dev, "p%d: DefaultVID set to %u\n", port, pvid); in mv88e6xxx_port_set_pvid()
|
| A D | port.h | 520 int mv88e6xxx_port_get_pvid(struct mv88e6xxx_chip *chip, int port, u16 *pvid); 521 int mv88e6xxx_port_set_pvid(struct mv88e6xxx_chip *chip, int port, u16 pvid);
|
| /drivers/net/ethernet/mscc/ |
| A D | ocelot_net.c | 492 static int ocelot_vlan_vid_add(struct net_device *dev, u16 vid, bool pvid, in ocelot_vlan_vid_add() argument 501 ret = ocelot_vlan_add(ocelot, port, vid, pvid, untagged); in ocelot_vlan_vid_add() 1095 static int ocelot_vlan_vid_prepare(struct net_device *dev, u16 vid, bool pvid, in ocelot_vlan_vid_prepare() argument 1103 return ocelot_vlan_prepare(ocelot, port, vid, pvid, untagged, extack); in ocelot_vlan_vid_prepare() 1111 bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; in ocelot_port_obj_add_vlan() local 1114 ret = ocelot_vlan_vid_prepare(dev, vlan->vid, pvid, untagged, extack); in ocelot_port_obj_add_vlan() 1118 return ocelot_vlan_vid_add(dev, vlan->vid, pvid, untagged); in ocelot_port_obj_add_vlan()
|
| /drivers/net/ethernet/mellanox/mlxsw/ |
| A D | spectrum_switchdev.c | 1417 else if (mlxsw_sp_port->pvid == vid) in mlxsw_sp_port_pvid_determine() 1420 return mlxsw_sp_port->pvid; in mlxsw_sp_port_pvid_determine() 1518 u16 pvid = mlxsw_sp_port_pvid_determine(mlxsw_sp_port, vid, is_pvid); in mlxsw_sp_bridge_port_vlan_add() local 1520 u16 old_pvid = mlxsw_sp_port->pvid; in mlxsw_sp_bridge_port_vlan_add() 1546 err = mlxsw_sp_port_pvid_set(mlxsw_sp_port, pvid, proto); in mlxsw_sp_bridge_port_vlan_add() 2292 u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : mlxsw_sp_port->pvid; in mlxsw_sp_bridge_port_vlan_del() local 2302 mlxsw_sp_port_pvid_set(mlxsw_sp_port, pvid, proto); in mlxsw_sp_bridge_port_vlan_del() 2575 u16 pvid; in mlxsw_sp_bridge_8021q_vxlan_dev_find() local 2581 err = mlxsw_sp_vxlan_mapped_vid(dev, &pvid); in mlxsw_sp_bridge_8021q_vxlan_dev_find() 2582 if (err || pvid != vid) in mlxsw_sp_bridge_8021q_vxlan_dev_find()
|