Home
last modified time | relevance | path

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

12345678910>>...46

/OK3568_Linux_fs/kernel/drivers/net/ethernet/mediatek/
H A Dmtk_eth_soc.c58 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) in mtk_w32() argument
60 __raw_writel(val, eth->base + reg); in mtk_w32()
63 u32 mtk_r32(struct mtk_eth *eth, unsigned reg) in mtk_r32() argument
65 return __raw_readl(eth->base + reg); in mtk_r32()
68 static u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg) in mtk_m32() argument
72 val = mtk_r32(eth, reg); in mtk_m32()
75 mtk_w32(eth, val, reg); in mtk_m32()
79 static int mtk_mdio_busy_wait(struct mtk_eth *eth) in mtk_mdio_busy_wait() argument
84 if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS)) in mtk_mdio_busy_wait()
91 dev_err(eth->dev, "mdio: MDIO timeout\n"); in mtk_mdio_busy_wait()
[all …]
H A Dmtk_eth_path.c18 int (*set_path)(struct mtk_eth *eth, int path);
43 static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, int path) in set_mux_gdm1_to_gmac1_esw() argument
63 val = mtk_r32(eth, MTK_MAC_MISC); in set_mux_gdm1_to_gmac1_esw()
65 mtk_w32(eth, val, MTK_MAC_MISC); in set_mux_gdm1_to_gmac1_esw()
68 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gdm1_to_gmac1_esw()
74 static int set_mux_gmac2_gmac0_to_gephy(struct mtk_eth *eth, int path) in set_mux_gmac2_gmac0_to_gephy() argument
89 regmap_update_bits(eth->infra, INFRA_MISC2, GEPHY_MAC_SEL, val); in set_mux_gmac2_gmac0_to_gephy()
91 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac2_gmac0_to_gephy()
97 static int set_mux_u3_gmac2_to_qphy(struct mtk_eth *eth, int path) in set_mux_u3_gmac2_to_qphy() argument
112 regmap_update_bits(eth->infra, INFRA_MISC2, CO_QPHY_SEL, val); in set_mux_u3_gmac2_to_qphy()
[all …]
/OK3568_Linux_fs/u-boot/drivers/net/
H A Dsh_eth.c58 struct sh_eth_dev *eth = dev->priv; in sh_eth_send() local
59 int port = eth->port, ret = 0, timeout; in sh_eth_send()
60 struct sh_eth_info *port_info = &eth->port_info[port]; in sh_eth_send()
89 if (!(sh_eth_read(eth, EDTRR) & EDTRR_TRNS)) in sh_eth_send()
90 sh_eth_write(eth, EDTRR_TRNS, EDTRR); in sh_eth_send()
116 struct sh_eth_dev *eth = dev->priv; in sh_eth_recv() local
117 int port = eth->port, len = 0; in sh_eth_recv()
118 struct sh_eth_info *port_info = &eth->port_info[port]; in sh_eth_recv()
150 if (!(sh_eth_read(eth, EDRRR) & EDRRR_R)) in sh_eth_recv()
151 sh_eth_write(eth, EDRRR_R, EDRRR); in sh_eth_recv()
[all …]
H A Dravb.c141 struct ravb_priv *eth = dev_get_priv(dev); in ravb_send() local
142 struct ravb_desc *desc = &eth->tx_desc[eth->tx_desc_idx]; in ravb_send()
153 if (!(readl(eth->iobase + RAVB_REG_TCCR) & TCCR_TSRQ0)) in ravb_send()
154 setbits_le32(eth->iobase + RAVB_REG_TCCR, TCCR_TSRQ0); in ravb_send()
168 eth->tx_desc_idx = (eth->tx_desc_idx + 1) % (RAVB_NUM_TX_DESC - 1); in ravb_send()
174 struct ravb_priv *eth = dev_get_priv(dev); in ravb_recv() local
175 struct ravb_rxdesc *desc = &eth->rx_desc[eth->rx_desc_idx]; in ravb_recv()
200 struct ravb_priv *eth = dev_get_priv(dev); in ravb_free_pkt() local
201 struct ravb_rxdesc *desc = &eth->rx_desc[eth->rx_desc_idx]; in ravb_free_pkt()
208 eth->rx_desc_idx = (eth->rx_desc_idx + 1) % RAVB_NUM_RX_DESC; in ravb_free_pkt()
[all …]
H A Dbcm-sf2-eth.c35 struct eth_info *eth = (struct eth_info *)(dev->priv); in bcm_sf2_eth_init() local
36 struct eth_dma *dma = &(eth->dma); in bcm_sf2_eth_init()
41 rc = eth->mac_init(dev); in bcm_sf2_eth_init()
51 eth->port_num = 0; in bcm_sf2_eth_init()
54 0, dev, eth->phy_interface); in bcm_sf2_eth_init()
56 eth->port[0] = phydev; in bcm_sf2_eth_init()
57 eth->port_num += 1; in bcm_sf2_eth_init()
62 for (i = 0; i < eth->port_num; i++) in bcm_sf2_eth_init()
63 phy_config(eth->port[i]); in bcm_sf2_eth_init()
140 struct eth_info *eth = (struct eth_info *)(dev->priv); in bcm_sf2_eth_write_hwaddr() local
[all …]
H A Dfec_mxc.c89 static int fec_mdio_read(struct ethernet_regs *eth, uint8_t phyaddr, in fec_mdio_read() argument
101 writel(FEC_IEVENT_MII, &eth->ievent); in fec_mdio_read()
106 phy | reg, &eth->mii_data); in fec_mdio_read()
110 while (!(readl(&eth->ievent) & FEC_IEVENT_MII)) { in fec_mdio_read()
118 writel(FEC_IEVENT_MII, &eth->ievent); in fec_mdio_read()
121 val = (unsigned short)readl(&eth->mii_data); in fec_mdio_read()
127 static void fec_mii_setspeed(struct ethernet_regs *eth) in fec_mii_setspeed() argument
150 writel(speed << 1 | hold << 8, &eth->mii_speed); in fec_mii_setspeed()
151 debug("%s: mii_speed %08x\n", __func__, readl(&eth->mii_speed)); in fec_mii_setspeed()
154 static int fec_mdio_write(struct ethernet_regs *eth, uint8_t phyaddr, in fec_mdio_write() argument
[all …]
H A Dnetconsole.c174 struct udevice *eth; in nc_send_packet() local
176 struct eth_device *eth; in nc_send_packet()
185 eth = eth_get_dev(); in nc_send_packet()
186 if (eth == NULL) in nc_send_packet()
190 if (eth_is_active(eth)) in nc_send_packet()
201 if (!eth_is_active(eth)) { in nc_send_packet()
300 struct udevice *eth; in nc_stdio_tstc() local
302 struct eth_device *eth; in nc_stdio_tstc()
311 eth = eth_get_dev(); in nc_stdio_tstc()
312 if (eth_is_active(eth)) in nc_stdio_tstc()
/OK3568_Linux_fs/kernel/samples/bpf/
H A 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 …]
H A Dxdp_redirect_cpu_kern.c115 bool parse_eth(struct ethhdr *eth, void *data_end, in parse_eth() argument
121 offset = sizeof(*eth); in parse_eth()
122 if ((void *)eth + offset > data_end) in parse_eth()
125 eth_type = eth->h_proto; in parse_eth()
135 vlan_hdr = (void *)eth + offset; in parse_eth()
137 if ((void *)eth + offset > data_end) in parse_eth()
145 vlan_hdr = (void *)eth + offset; in parse_eth()
147 if ((void *)eth + offset > data_end) in parse_eth()
238 struct ethhdr *eth = data; in xdp_prognum1_touch_data() local
252 if (eth + 1 > data_end) in xdp_prognum1_touch_data()
[all …]
H A Dxdp_adjust_tail_kern.c50 struct ethhdr *eth; in swap_mac() local
52 eth = data; in swap_mac()
53 memcpy(eth->h_source, orig_eth->h_dest, ETH_ALEN); in swap_mac()
54 memcpy(eth->h_dest, orig_eth->h_source, ETH_ALEN); in swap_mac()
55 eth->h_proto = orig_eth->h_proto; in swap_mac()
141 struct ethhdr *eth = data; in _xdp_icmp() local
144 if (eth + 1 > data_end) in _xdp_icmp()
147 h_proto = eth->h_proto; in _xdp_icmp()
H A 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()
/OK3568_Linux_fs/u-boot/net/
H A Deth-uclass.su
/OK3568_Linux_fs/kernel/net/ethernet/
H A Deth.c83 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header() local
86 eth->h_proto = htons(type); in eth_header()
88 eth->h_proto = htons(len); in eth_header()
96 memcpy(eth->h_source, saddr, ETH_ALEN); in eth_header()
99 memcpy(eth->h_dest, daddr, ETH_ALEN); in eth_header()
108 eth_zero_addr(eth->h_dest); in eth_header()
128 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen() local
132 if (unlikely(len < sizeof(*eth))) in eth_get_headlen()
137 eth->h_proto, sizeof(*eth), in eth_get_headlen()
139 return max_t(u32, keys.control.thoff, sizeof(*eth)); in eth_get_headlen()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/freescale/dpaa2/
H A DMakefile6 obj-$(CONFIG_FSL_DPAA2_ETH) += fsl-dpaa2-eth.o
9 fsl-dpaa2-eth-objs := dpaa2-eth.o dpaa2-ethtool.o dpni.o dpaa2-mac.o dpmac.o dpaa2-eth-devlink.o
10 fsl-dpaa2-eth-${CONFIG_FSL_DPAA2_ETH_DCB} += dpaa2-eth-dcb.o
11 fsl-dpaa2-eth-${CONFIG_DEBUG_FS} += dpaa2-eth-debugfs.o
15 CFLAGS_dpaa2-eth.o := -I$(src)
/OK3568_Linux_fs/kernel/drivers/infiniband/hw/mlx4/
H A Dah.c93 memcpy(ah->av.eth.mac, ah_attr->roce.dmac, ETH_ALEN); in create_iboe_ah()
94 eth_zero_addr(ah->av.eth.s_mac); in create_iboe_ah()
103 &ah->av.eth.s_mac[0]); in create_iboe_ah()
110 ah->av.eth.gid_index = ret; in create_iboe_ah()
113 ah->av.eth.gid_index = ah_attr->grh.sgid_index; in create_iboe_ah()
118 ah->av.eth.port_pd = cpu_to_be32(to_mpd(ib_ah->pd)->pdn | in create_iboe_ah()
120 ah->av.eth.vlan = cpu_to_be16(vlan_tag); in create_iboe_ah()
121 ah->av.eth.hop_limit = grh->hop_limit; in create_iboe_ah()
123 ah->av.eth.stat_rate = rdma_ah_get_static_rate(ah_attr) + in create_iboe_ah()
125 while (ah->av.eth.stat_rate > IB_RATE_2_5_GBPS + MLX4_STAT_RATE_OFFSET && in create_iboe_ah()
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/
H A 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";
H A 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
14 "mediatek,mt7629-eth": for MT7629 SoC
15 "ralink,rt5350-eth": for Ralink Rt5350F and MT7628/88 SoC
47 - compatible: Should be "mediatek,eth-mac"
56 eth: ethernet@1b100000 {
57 compatible = "mediatek,mt7623-eth";
69 reset-names = "eth";
76 compatible = "mediatek,eth-mac";
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/sgi/
H A Dmeth.c109 mace->eth.mac_addr = macaddr; in load_eaddr()
116 while ((___rval = mace->eth.phy_data) & MDIO_BUSY) { \
124 mace->eth.phy_regs = (priv->phy_addr << 5) | (phyreg & 0x1f); in mdio_read()
126 mace->eth.phy_trans_go = 1; in mdio_read()
195 mace->eth.mac_ctrl = priv->mac_ctrl; in meth_check_link()
204 mace->eth.mac_ctrl = priv->mac_ctrl; in meth_check_link()
218 mace->eth.tx_ring_base = priv->tx_ring_dma; in meth_init_tx_ring()
239 mace->eth.rx_fifo = priv->rx_ring_dmas[i]; in meth_init_rx_ring()
276 mace->eth.mac_ctrl = SGI_MAC_RESET; in meth_reset()
278 mace->eth.mac_ctrl = 0; in meth_reset()
[all …]
/OK3568_Linux_fs/kernel/tools/testing/selftests/bpf/progs/
H A Dxdping_kern.c63 struct ethhdr *eth = data; in icmp_check() local
67 if (data + sizeof(*eth) + sizeof(*iph) + ICMP_ECHO_LEN > data_end) in icmp_check()
70 if (eth->h_proto != bpf_htons(ETH_P_IP)) in icmp_check()
73 iph = data + sizeof(*eth); in icmp_check()
81 icmph = data + sizeof(*eth) + sizeof(*iph); in icmp_check()
95 struct ethhdr *eth = data; in xdping_client() local
109 iph = data + sizeof(*eth); in xdping_client()
110 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_client()
158 struct ethhdr *eth = data; in xdping_server() local
169 iph = data + sizeof(*eth); in xdping_server()
[all …]
/OK3568_Linux_fs/u-boot/drivers/usb/eth/
H A Dmcs7830.c587 static int mcs7830_init(struct eth_device *eth, bd_t *bd) in mcs7830_init() argument
589 struct ueth_data *dev = eth->priv; in mcs7830_init()
603 static int mcs7830_send(struct eth_device *eth, void *packet, int length) in mcs7830_send() argument
605 struct ueth_data *dev = eth->priv; in mcs7830_send()
618 static int mcs7830_recv(struct eth_device *eth) in mcs7830_recv() argument
621 struct ueth_data *ueth = eth->priv; in mcs7830_recv()
641 static void mcs7830_halt(struct eth_device *eth) in mcs7830_halt() argument
655 static int mcs7830_write_mac(struct eth_device *eth) in mcs7830_write_mac() argument
657 struct ueth_data *ueth = eth->priv; in mcs7830_write_mac()
659 return mcs7830_write_mac_common(ueth->pusb_dev, eth->enetaddr); in mcs7830_write_mac()
[all …]
H A Dasix.c499 static int asix_init(struct eth_device *eth, bd_t *bd) in asix_init() argument
501 struct ueth_data *dev = (struct ueth_data *)eth->priv; in asix_init()
503 return asix_init_common(dev, eth->enetaddr); in asix_init()
506 static int asix_send(struct eth_device *eth, void *packet, int length) in asix_send() argument
508 struct ueth_data *dev = (struct ueth_data *)eth->priv; in asix_send()
513 static int asix_recv(struct eth_device *eth) in asix_recv() argument
515 struct ueth_data *dev = (struct ueth_data *)eth->priv; in asix_recv()
579 static void asix_halt(struct eth_device *eth) in asix_halt() argument
584 static int asix_write_hwaddr(struct eth_device *eth) in asix_write_hwaddr() argument
586 struct ueth_data *dev = (struct ueth_data *)eth->priv; in asix_write_hwaddr()
[all …]
/OK3568_Linux_fs/kernel/arch/mips/cavium-octeon/
H A Docteon-platform.c481 static void __init octeon_fdt_set_phy(int eth, int phy_addr) in octeon_fdt_set_phy() argument
493 phy_handle = fdt_getprop(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy()
500 alt_phy_handle = fdt_getprop(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy()
511 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy()
513 fdt_nop_property(initial_boot_params, eth, "cavium,alt-phy-handle"); in octeon_fdt_set_phy()
527 phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy()
530 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy()
531 alt_prop = fdt_get_property_w(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy()
609 static void __init _octeon_rx_tx_delay(int eth, int rx_delay, int tx_delay) in _octeon_rx_tx_delay() argument
611 fdt_setprop_inplace_cell(initial_boot_params, eth, "rx-delay", in _octeon_rx_tx_delay()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/wireless/marvell/mwifiex/
H A 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()
/OK3568_Linux_fs/kernel/net/openvswitch/
H A Dflow.c339 key->eth.vlan.tci = 0; in clear_vlan()
340 key->eth.vlan.tpid = 0; in clear_vlan()
341 key->eth.cvlan.tci = 0; in clear_vlan()
342 key->eth.cvlan.tpid = 0; in clear_vlan()
350 key->eth.vlan.tci = htons(skb->vlan_tci) | htons(VLAN_CFI_MASK); in parse_vlan()
351 key->eth.vlan.tpid = skb->vlan_proto; in parse_vlan()
354 res = parse_vlan_tag(skb, &key->eth.vlan, true); in parse_vlan()
360 res = parse_vlan_tag(skb, &key->eth.cvlan, false); in parse_vlan()
537 if (key->eth.type == htons(ETH_P_IP)) { in key_extract_l3l4()
612 } else if (key->eth.type == htons(ETH_P_ARP) || in key_extract_l3l4()
[all …]
/OK3568_Linux_fs/kernel/drivers/infiniband/hw/ocrdma/
H A Docrdma_ah.c78 struct ocrdma_eth_vlan eth; in set_av_attr() local
90 memset(&eth, 0, sizeof(eth)); in set_av_attr()
108 eth.eth_type = cpu_to_be16(0x8100); in set_av_attr()
109 eth.roce_eth_type = cpu_to_be16(proto_num); in set_av_attr()
111 eth.vlan_tag = cpu_to_be16(vlan_tag); in set_av_attr()
115 eth.eth_type = cpu_to_be16(proto_num); in set_av_attr()
119 memcpy(&eth.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN); in set_av_attr()
120 status = ocrdma_resolve_dmac(dev, attr, &eth.dmac[0]); in set_av_attr()
126 memcpy(&ah->av->eth_hdr, &eth, eth_sz); in set_av_attr()

12345678910>>...46