Home
last modified time | relevance | path

Searched refs:eth (Results 1 – 25 of 303) sorted by relevance

12345678910>>...13

/Linux-v4.19/drivers/staging/mt7621-eth/
Dmdio.c27 struct mtk_eth *eth = netdev_priv(dev); in mtk_phy_link_adjust() local
31 spin_lock_irqsave(&eth->phy->lock, flags); in mtk_phy_link_adjust()
33 if (eth->phy->phy_node[i]) { in mtk_phy_link_adjust()
34 struct phy_device *phydev = eth->phy->phy[i]; in mtk_phy_link_adjust()
38 if (eth->phy->duplex[i] != phydev->duplex || in mtk_phy_link_adjust()
39 eth->phy->speed[i] != phydev->speed) in mtk_phy_link_adjust()
42 if (phydev->link != eth->link[i]) in mtk_phy_link_adjust()
49 eth->link[i] = phydev->link; in mtk_phy_link_adjust()
50 eth->phy->duplex[i] = phydev->duplex; in mtk_phy_link_adjust()
51 eth->phy->speed[i] = phydev->speed; in mtk_phy_link_adjust()
[all …]
Dmtk_eth_soc.c85 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned int reg) in mtk_w32() argument
87 __raw_writel(val, eth->base + reg); in mtk_w32()
90 u32 mtk_r32(struct mtk_eth *eth, unsigned int reg) in mtk_r32() argument
92 return __raw_readl(eth->base + reg); in mtk_r32()
95 static void mtk_reg_w32(struct mtk_eth *eth, u32 val, enum mtk_reg reg) in mtk_reg_w32() argument
97 mtk_w32(eth, val, mtk_reg_table[reg]); in mtk_reg_w32()
100 static u32 mtk_reg_r32(struct mtk_eth *eth, enum mtk_reg reg) in mtk_reg_r32() argument
102 return mtk_r32(eth, mtk_reg_table[reg]); in mtk_reg_r32()
110 void mtk_reset(struct mtk_eth *eth, u32 reset_bits) in mtk_reset() argument
114 regmap_read(eth->ethsys, SYSC_REG_RSTCTRL, &val); in mtk_reset()
[all …]
Dmdio_mt7620.c83 struct mtk_eth *eth = bus->priv; in mt7620_mdio_write() local
84 struct mt7620_gsw *gsw = (struct mt7620_gsw *)eth->sw_priv; in mt7620_mdio_write()
91 struct mtk_eth *eth = bus->priv; in mt7620_mdio_read() local
92 struct mt7620_gsw *gsw = (struct mt7620_gsw *)eth->sw_priv; in mt7620_mdio_read()
144 int mt7620_has_carrier(struct mtk_eth *eth) in mt7620_has_carrier() argument
146 struct mt7620_gsw *gsw = (struct mt7620_gsw *)eth->sw_priv; in mt7620_has_carrier()
155 void mt7620_print_link_state(struct mtk_eth *eth, int port, int link, in mt7620_print_link_state() argument
158 struct mt7620_gsw *gsw = eth->sw_priv; in mt7620_print_link_state()
168 void mt7620_mdio_link_adjust(struct mtk_eth *eth, int port) in mt7620_mdio_link_adjust() argument
170 mt7620_print_link_state(eth, port, eth->link[port], in mt7620_mdio_link_adjust()
[all …]
Dmdio.h19 int mtk_mdio_init(struct mtk_eth *eth);
20 void mtk_mdio_cleanup(struct mtk_eth *eth);
21 int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
24 static inline int mtk_mdio_init(struct mtk_eth *eth) { return 0; } in mtk_mdio_init() argument
25 static inline void mtk_mdio_cleanup(struct mtk_eth *eth) {} in mtk_mdio_cleanup() argument
Dgsw_mt7621.c41 struct mtk_eth *eth = (struct mtk_eth *)_eth; in gsw_interrupt_mt7621() local
42 struct mt7620_gsw *gsw = (struct mt7620_gsw *)eth->sw_priv; in gsw_interrupt_mt7621()
55 if (link == eth->link[i]) in gsw_interrupt_mt7621()
58 eth->link[i] = link; in gsw_interrupt_mt7621()
60 netdev_info(*eth->netdev, in gsw_interrupt_mt7621()
63 netdev_info(*eth->netdev, in gsw_interrupt_mt7621()
72 static void mt7621_hw_init(struct mtk_eth *eth, struct mt7620_gsw *gsw, in mt7621_hw_init() argument
79 mtk_reset(eth, RST_CTRL_MCM); in mt7621_hw_init()
226 int mtk_gsw_init(struct mtk_eth *eth) in mtk_gsw_init() argument
228 struct device_node *np = eth->switch_np; in mtk_gsw_init()
[all …]
DMakefile5 mtk-eth-soc-y += mtk_eth_soc.o ethtool.o
7 mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO) += mdio.o
8 mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_MT7620) += mdio_mt7620.o
10 mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621) += soc_mt7621.o
14 obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mtk-eth-soc.o
Dsoc_mt7621.c82 static void mt7621_mtk_reset(struct mtk_eth *eth) in mt7621_mtk_reset() argument
84 mtk_reset(eth, MT7621_RESET_FE); in mt7621_mtk_reset()
87 static int mt7621_fwd_config(struct mtk_eth *eth) in mt7621_fwd_config() argument
90 mtk_w32(eth, mtk_r32(eth, MT7620_GDMA1_FWD_CFG) & ~0xffff, in mt7621_fwd_config()
94 mtk_w32(eth, mtk_r32(eth, MT7620_GDMA1_FWD_CFG) | (GDMA_ICS_EN | in mt7621_fwd_config()
99 mtk_w32(eth, 0, MT7621_CDMP_EG_CTRL); in mt7621_fwd_config()
Dmtk_eth_soc.h469 void (*reset_fe)(struct mtk_eth *eth);
471 int (*fwd_config)(struct mtk_eth *eth);
472 int (*switch_init)(struct mtk_eth *eth);
473 void (*port_init)(struct mtk_eth *eth, struct mtk_mac *mac,
475 int (*has_carrier)(struct mtk_eth *eth);
476 int (*mdio_init)(struct mtk_eth *eth);
477 void (*mdio_cleanup)(struct mtk_eth *eth);
481 void (*mdio_adjust_link)(struct mtk_eth *eth, int port);
586 int (*tx_poll)(struct mtk_eth *eth, int budget, bool *tx_again);
587 void (*tx_clean)(struct mtk_eth *eth);
[all …]
/Linux-v4.19/drivers/net/ethernet/mediatek/
Dmtk_eth_soc.c61 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) in mtk_w32() argument
63 __raw_writel(val, eth->base + reg); in mtk_w32()
66 u32 mtk_r32(struct mtk_eth *eth, unsigned reg) in mtk_r32() argument
68 return __raw_readl(eth->base + reg); in mtk_r32()
71 static int mtk_mdio_busy_wait(struct mtk_eth *eth) in mtk_mdio_busy_wait() argument
76 if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS)) in mtk_mdio_busy_wait()
83 dev_err(eth->dev, "mdio: MDIO timeout\n"); in mtk_mdio_busy_wait()
87 static u32 _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr, in _mtk_mdio_write() argument
90 if (mtk_mdio_busy_wait(eth)) in _mtk_mdio_write()
95 mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE | in _mtk_mdio_write()
[all …]
/Linux-v4.19/samples/bpf/
Dtc_l2_redirect_kern.c63 struct eth_hdr *eth = data; in _l2_to_iptun_ingress_forward() local
69 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_forward()
76 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_forward()
78 struct iphdr *iph = data + sizeof(*eth); in _l2_to_iptun_ingress_forward()
80 if (data + sizeof(*eth) + sizeof(*iph) > data_end) in _l2_to_iptun_ingress_forward()
89 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_iptun_ingress_forward()
91 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_iptun_ingress_forward()
93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_iptun_ingress_forward()
114 struct eth_hdr *eth = data; in _l2_to_iptun_ingress_redirect() local
120 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_redirect()
[all …]
Dparse_simple.c30 struct eth_hdr *eth = data; in handle_ingress() local
31 struct iphdr *iph = data + sizeof(*eth); in handle_ingress()
32 struct udphdr *udp = data + sizeof(*eth) + sizeof(*iph); in handle_ingress()
36 if (data + sizeof(*eth) + sizeof(*iph) + sizeof(*udp) > data_end) in handle_ingress()
39 if (eth->h_proto != htons(ETH_P_IP)) in handle_ingress()
Dxdp_adjust_tail_kern.c47 struct ethhdr *eth; in swap_mac() local
49 eth = data; in swap_mac()
50 memcpy(eth->h_source, orig_eth->h_dest, ETH_ALEN); in swap_mac()
51 memcpy(eth->h_dest, orig_eth->h_source, ETH_ALEN); in swap_mac()
52 eth->h_proto = orig_eth->h_proto; in swap_mac()
138 struct ethhdr *eth = data; in _xdp_icmp() local
141 if (eth + 1 > data_end) in _xdp_icmp()
144 h_proto = eth->h_proto; in _xdp_icmp()
Dtest_cgrp2_tc_kern.c45 struct eth_hdr *eth = data; in handle_egress() local
46 struct ipv6hdr *ip6h = data + sizeof(*eth); in handle_egress()
53 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in handle_egress()
56 if (eth->h_proto != htons(ETH_P_IPV6) || in handle_egress()
59 eth->h_proto, ip6h->nexthdr); in handle_egress()
Dxdp_redirect_cpu_kern.c112 bool parse_eth(struct ethhdr *eth, void *data_end, in parse_eth() argument
118 offset = sizeof(*eth); in parse_eth()
119 if ((void *)eth + offset > data_end) in parse_eth()
122 eth_type = eth->h_proto; in parse_eth()
132 vlan_hdr = (void *)eth + offset; in parse_eth()
134 if ((void *)eth + offset > data_end) in parse_eth()
142 vlan_hdr = (void *)eth + offset; in parse_eth()
144 if ((void *)eth + offset > data_end) in parse_eth()
235 struct ethhdr *eth = data; in xdp_prognum1_touch_data() local
249 if (eth + 1 > data_end) in xdp_prognum1_touch_data()
[all …]
Dxdp_fwd_kern.c48 struct ethhdr *eth = data; in xdp_fwd_flags() local
55 nh_off = sizeof(*eth); in xdp_fwd_flags()
61 h_proto = eth->h_proto; in xdp_fwd_flags()
118 memcpy(eth->h_dest, fib_params.dmac, ETH_ALEN); in xdp_fwd_flags()
119 memcpy(eth->h_source, fib_params.smac, ETH_ALEN); in xdp_fwd_flags()
/Linux-v4.19/net/ethernet/
Deth.c86 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header() local
89 eth->h_proto = htons(type); in eth_header()
91 eth->h_proto = htons(len); in eth_header()
99 memcpy(eth->h_source, saddr, ETH_ALEN); in eth_header()
102 memcpy(eth->h_dest, daddr, ETH_ALEN); in eth_header()
111 eth_zero_addr(eth->h_dest); in eth_header()
130 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen() local
134 if (unlikely(len < sizeof(*eth))) in eth_get_headlen()
138 if (!skb_flow_dissect_flow_keys_basic(NULL, &keys, data, eth->h_proto, in eth_get_headlen()
139 sizeof(*eth), len, flags)) in eth_get_headlen()
[all …]
/Linux-v4.19/drivers/infiniband/hw/mlx4/
Dah.c97 memcpy(ah->av.eth.mac, ah_attr->roce.dmac, ETH_ALEN); in create_iboe_ah()
98 eth_zero_addr(ah->av.eth.s_mac); in create_iboe_ah()
108 memcpy(ah->av.eth.s_mac, gid_attr->ndev->dev_addr, ETH_ALEN); in create_iboe_ah()
112 ah->av.eth.gid_index = ret; in create_iboe_ah()
115 ah->av.eth.gid_index = ah_attr->grh.sgid_index; in create_iboe_ah()
120 ah->av.eth.port_pd = cpu_to_be32(to_mpd(pd)->pdn | in create_iboe_ah()
122 ah->av.eth.vlan = cpu_to_be16(vlan_tag); in create_iboe_ah()
123 ah->av.eth.hop_limit = grh->hop_limit; in create_iboe_ah()
125 ah->av.eth.stat_rate = rdma_ah_get_static_rate(ah_attr) + in create_iboe_ah()
127 while (ah->av.eth.stat_rate > IB_RATE_2_5_GBPS + MLX4_STAT_RATE_OFFSET && in create_iboe_ah()
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/net/
Dralink,rt2880-net.txt13 - compatible: Should be one of "ralink,rt2880-eth", "ralink,rt3050-eth",
14 "ralink,rt3050-eth", "ralink,rt3883-eth", "ralink,rt5350-eth",
15 "mediatek,mt7620-eth", "mediatek,mt7621-eth"
26 - compatible: Should be "ralink,eth-port"
41 compatible = "ralink,rt2880-eth";
54 compatible = "ralink,eth-port";
Dmediatek-net.txt11 "mediatek,mt2701-eth": for MT2701 SoC
12 "mediatek,mt7623-eth", "mediatek,mt2701-eth": for MT7623 SoC
13 "mediatek,mt7622-eth": for MT7622 SoC
36 - compatible: Should be "mediatek,eth-mac"
45 eth: ethernet@1b100000 {
46 compatible = "mediatek,mt7623-eth";
58 reset-names = "eth";
65 compatible = "mediatek,eth-mac";
71 compatible = "mediatek,eth-mac";
/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_pkt_access.c28 struct ethhdr *eth = (struct ethhdr *)(data); in process() local
33 if (eth + 1 > data_end) in process()
36 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in process()
37 struct iphdr *iph = (struct iphdr *)(eth + 1); in process()
44 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in process()
45 struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1); in process()
/Linux-v4.19/drivers/net/ethernet/sgi/
Dmeth.c111 mace->eth.mac_addr = macaddr; in load_eaddr()
118 while ((___rval = mace->eth.phy_data) & MDIO_BUSY) { \
126 mace->eth.phy_regs = (priv->phy_addr << 5) | (phyreg & 0x1f); in mdio_read()
128 mace->eth.phy_trans_go = 1; in mdio_read()
197 mace->eth.mac_ctrl = priv->mac_ctrl; in meth_check_link()
206 mace->eth.mac_ctrl = priv->mac_ctrl; in meth_check_link()
220 mace->eth.tx_ring_base = priv->tx_ring_dma; in meth_init_tx_ring()
241 mace->eth.rx_fifo = priv->rx_ring_dmas[i]; in meth_init_rx_ring()
279 mace->eth.mac_ctrl = SGI_MAC_RESET; in meth_reset()
281 mace->eth.mac_ctrl = 0; in meth_reset()
[all …]
/Linux-v4.19/drivers/staging/fsl-dpaa2/ethernet/
DMakefile6 obj-$(CONFIG_FSL_DPAA2_ETH) += fsl-dpaa2-eth.o
8 fsl-dpaa2-eth-objs := dpaa2-eth.o dpaa2-ethtool.o dpni.o
11 CFLAGS_dpaa2-eth.o := -I$(src)
/Linux-v4.19/drivers/net/wireless/marvell/mwifiex/
Dsta_rx.c39 struct ethhdr *eth; in mwifiex_discard_gratuitous_arp() local
43 eth = (struct ethhdr *)skb->data; in mwifiex_discard_gratuitous_arp()
44 switch (ntohs(eth->h_proto)) { in mwifiex_discard_gratuitous_arp()
90 struct ethhdr *eth; in mwifiex_process_rx_packet() local
116 eth = (struct ethhdr *) in mwifiex_process_rx_packet()
124 memcpy(eth->h_source, rx_pkt_hdr->eth803_hdr.h_source, in mwifiex_process_rx_packet()
125 sizeof(eth->h_source)); in mwifiex_process_rx_packet()
126 memcpy(eth->h_dest, rx_pkt_hdr->eth803_hdr.h_dest, in mwifiex_process_rx_packet()
127 sizeof(eth->h_dest)); in mwifiex_process_rx_packet()
131 hdr_chop = (u8 *) eth - (u8 *) local_rx_pd; in mwifiex_process_rx_packet()
/Linux-v4.19/net/openvswitch/
Dflow.c354 key->eth.vlan.tci = 0; in clear_vlan()
355 key->eth.vlan.tpid = 0; in clear_vlan()
356 key->eth.cvlan.tci = 0; in clear_vlan()
357 key->eth.cvlan.tpid = 0; in clear_vlan()
365 key->eth.vlan.tci = htons(skb->vlan_tci); in parse_vlan()
366 key->eth.vlan.tpid = skb->vlan_proto; in parse_vlan()
369 res = parse_vlan_tag(skb, &key->eth.vlan, true); in parse_vlan()
375 res = parse_vlan_tag(skb, &key->eth.cvlan, false); in parse_vlan()
568 struct ethhdr *eth; in key_extract() local
582 key->eth.type = skb->protocol; in key_extract()
[all …]
/Linux-v4.19/drivers/infiniband/hw/ocrdma/
Docrdma_ah.c78 struct ocrdma_eth_vlan eth; in set_av_attr() local
91 memset(&eth, 0, sizeof(eth)); in set_av_attr()
109 eth.eth_type = cpu_to_be16(0x8100); in set_av_attr()
110 eth.roce_eth_type = cpu_to_be16(proto_num); in set_av_attr()
112 eth.vlan_tag = cpu_to_be16(vlan_tag); in set_av_attr()
116 eth.eth_type = cpu_to_be16(proto_num); in set_av_attr()
120 memcpy(&eth.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN); in set_av_attr()
121 status = ocrdma_resolve_dmac(dev, attr, &eth.dmac[0]); in set_av_attr()
127 memcpy(&ah->av->eth_hdr, &eth, eth_sz); in set_av_attr()

12345678910>>...13