/freebsd/sys/dev/eqos/ |
H A D | if_eqos.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 29 * $Id: eqos.c 1059 2022-12-08 19:32:32Z sos $ 33 * DesignWare Ethernet Quality-of-Service controller 84 #define TX_QUEUED(h, t) ((((h) - (t)) + TX_DESC_COUNT) % TX_DESC_COUNT) 93 #define EQOS_LOCK(sc) mtx_lock(&(sc)->lock) 94 #define EQOS_UNLOCK(sc) mtx_unlock(&(sc)->lock) 95 #define EQOS_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) 97 #define RD4(sc, o) bus_read_4(sc->res[EQOS_RES_MEM], (o)) 98 #define WR4(sc, o, v) bus_write_4(sc->res[EQOS_RES_MEM], (o), (v)) [all …]
|
/freebsd/sys/powerpc/pseries/ |
H A D | phyp_llan.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 57 #include <powerpc/pseries/phyp-hvcall.h> 124 static int llan_add_rxbuf(struct llan_softc *sc, struct llan_xfer *rx); 145 if (!ofw_bus_is_compatible(dev,"IBM,l-lan")) in llan_probe() 161 sc->dev = dev; in llan_attach() 165 len = OF_getprop(node, "local-mac-address", sc->mac_address, in llan_attach() 166 sizeof(sc->mac_address)); in llan_attach() 167 /* If local-mac-address property has only 6 bytes (ETHER_ADDR_LEN) in llan_attach() 168 * instead of 8 (sizeof(sc->mac_address)), then its value must be in llan_attach() [all …]
|
/freebsd/sys/dev/neta/ |
H A D | if_mvneta.c | 111 /* Rx/Tx Queue Control */ 166 /* Rx Subroutines */ 191 #define mvneta_sc_lock(sc) mtx_lock(&sc->mtx) 192 #define mvneta_sc_unlock(sc) mtx_unlock(&sc->mtx) 270 "rx_good_oct", "Good Octets Rx"}, 272 "rx_bad_oct", "Bad Octets Rx"}, 276 "rx_good_frame", "Good Frames Rx"}, 278 "rx_bad_frame", "Bad Frames Rx"}, 280 "rx_bcast_frame", "Broadcast Frames Rx"}, 282 "rx_mcast_frame", "Multicast Frames Rx"}, [all …]
|
/freebsd/sys/arm/allwinner/ |
H A D | if_awg.c | 1 /*- 71 #define RD4(sc, reg) bus_read_4((sc)->res[_RES_EMAC], (reg)) 72 #define WR4(sc, reg, val) bus_write_4((sc)->res[_RES_EMAC], (reg), (val)) 74 #define AWG_LOCK(sc) mtx_lock(&(sc)->mtx) 75 #define AWG_UNLOCK(sc) mtx_unlock(&(sc)->mtx); 76 #define AWG_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) 77 #define AWG_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) 86 #define TX_NEXT(n) (((n) + 1) & (TX_DESC_COUNT - 1)) 87 #define TX_SKIP(n, o) (((n) + (o)) & (TX_DESC_COUNT - 1)) 88 #define RX_NEXT(n) (((n) + 1) & (RX_DESC_COUNT - 1)) [all …]
|
/freebsd/sys/dev/xen/netfront/ |
H A D | netfront.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2004-2006 Kip Macy 64 #include <xen/xen-os.h> 85 * Should the driver do LRO on the RX end 240 struct netif_rx_response rx; member 241 struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX - 1]; 244 #define XN_RX_LOCK(_q) mtx_lock(&(_q)->lock) 245 #define XN_RX_UNLOCK(_q) mtx_unlock(&(_q)->lock) 247 #define XN_TX_LOCK(_q) mtx_lock(&(_q)->lock) [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/sound/ |
H A D | rockchip,i2s-tdm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/rockchip,i2s-tdm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 15 - Nicolas Frattaroli <frattaroli.nicolas@gmail.com> 18 - $ref: dai-common.yaml# 23 - rockchip,px30-i2s-tdm 24 - rockchip,rk1808-i2s-tdm 25 - rockchip,rk3308-i2s-tdm 26 - rockchip,rk3568-i2s-tdm [all …]
|
/freebsd/sys/dev/ath/ |
H A D | if_ath_rx.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 44 * by the driver - eg, calls to ath_hal_gettsf32(). 134 * NB: older hal's add rx filter bits out of sight and we need to 139 * - when in monitor mode 140 * - if interface marked PROMISC (assumes bridge setting is filtered) 142 * - when operating in station mode for collecting rssi data when 144 * - when operating in adhoc mode so the 802.11 layer creates 146 * - when scanning [all …]
|
H A D | if_ath_rx_edma.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 44 * by the driver - eg, calls to ath_hal_gettsf32(). 129 #define INCR(_l, _sz) (_l) ++; (_l) &= ((_sz) - 1) 130 #define DECR(_l, _sz) (_l) --; (_l) &= ((_sz) - 1) 139 * + Verify multi-descriptor frames work! 142 * may be a generic RX path issue. 146 * XXX shuffle the function orders so these pre-declarations aren't 161 struct ath_hal *ah = sc->sc_ah; in ath_edma_stoprecv() 175 sc->sc_rx_stopped = 1; in ath_edma_stoprecv() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/net/ |
H A D | nvidia,tegra234-mgbe.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Tegra234 MGBE Multi-Gigabit Ethernet Controller 10 - Thierry Reding <treding@nvidia.com> 11 - Jon Hunter <jonathanh@nvidia.com> 15 const: nvidia,tegra234-mgbe 20 reg-names: 22 - const: hypervisor [all …]
|
/freebsd/tools/tools/netmap/ |
H A D | bridge.c | 2 * (C) 2011-2014 Luigi Rizzo, Matteo Landi 45 for (i = d->first_rx_ring; i <= d->last_rx_ring; i++) { in rx_slots_avail() 46 tot += nm_ring_space(NETMAP_RXRING(d->nifp, i)); in rx_slots_avail() 57 for (i = d->first_tx_ring; i <= d->last_tx_ring; i++) { in tx_slots_avail() 58 tot += nm_ring_space(NETMAP_TXRING(d->nifp, i)); in tx_slots_avail() 72 u_int j, k, m = 0; in rings_move() local 75 if (rxring->flags || txring->flags) in rings_move() 77 msg, rxring->flags, txring->flags); in rings_move() 78 j = rxring->head; /* RX */ in rings_move() 79 k = txring->head; /* TX */ in rings_move() [all …]
|
/freebsd/sys/dev/rtwn/pci/ |
H A D | rtwn_pci_rx.c | 3 /*- 74 desc->rxdw0 = htole32(SM(RTWN_RXDW0_PKTLEN, len) | in rtwn_pci_setup_rx_desc() 75 ((idx == RTWN_PCI_RX_LIST_COUNT - 1) ? RTWN_RXDW0_EOR : 0)); in rtwn_pci_setup_rx_desc() 76 desc->rxbufaddr = htole32(addr); in rtwn_pci_setup_rx_desc() 77 bus_space_barrier(pc->pc_st, pc->pc_sh, 0, pc->pc_mapsize, in rtwn_pci_setup_rx_desc() 79 desc->rxdw0 |= htole32(RTWN_RXDW0_OWN); in rtwn_pci_setup_rx_desc() 85 struct rtwn_softc *sc = &pc->pc_sc; in rtwn_pci_rx_frame() 86 struct rtwn_rx_ring *ring = &pc->rx_ring; in rtwn_pci_rx_frame() 87 struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur]; in rtwn_pci_rx_frame() 88 struct rtwn_rx_data *rx_data = &ring->rx_data[ring->cur]; in rtwn_pci_rx_frame() [all …]
|
/freebsd/sys/dev/vte/ |
H A D | if_vte.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 177 for (i = VTE_PHY_TIMEOUT; i > 0; i--) { in vte_miibus_readreg() 184 device_printf(sc->vte_dev, "phy read timeout : %d\n", reg); in vte_miibus_readreg() 202 for (i = VTE_PHY_TIMEOUT; i > 0; i--) { in vte_miibus_writereg() 209 device_printf(sc->vte_dev, "phy write timeout : %d\n", reg); in vte_miibus_writereg() 224 mii = device_get_softc(sc->vte_miibus); in vte_miibus_statchg() 225 ifp = sc->vte_ifp; in vte_miibus_statchg() 229 sc->vte_flags &= ~VTE_FLAG_LINK; in vte_miibus_statchg() 230 if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == in vte_miibus_statchg() [all …]
|
/freebsd/sys/dev/rtwn/usb/ |
H A D | rtwn_usb_rx.c | 3 /*- 6 * Copyright (c) 2015-2016 Andriy Voskoboinyk <avos@FreeBSD.org> 80 if (!(sc->sc_flags & RTWN_RUNNING)) in rtwn_rx_check_pre_alloc() 81 return (-1); in rtwn_rx_check_pre_alloc() 83 rxdw0 = le32toh(stat->rxdw0); in rtwn_rx_check_pre_alloc() 86 * This should not happen since we setup our Rx filter in rtwn_rx_check_pre_alloc() 90 "%s: RX flags error (%s)\n", __func__, in rtwn_rx_check_pre_alloc() 92 return (-1); in rtwn_rx_check_pre_alloc() 98 * Should not happen (because of Rx filter setup). in rtwn_rx_check_pre_alloc() 102 return (-1); in rtwn_rx_check_pre_alloc() [all …]
|
/freebsd/sys/dev/ice/ |
H A D | ice_iflib_txrx.c | 1 /* SPDX-License-Identifier: BSD-3-Clause */ 34 * @brief iflib Tx/Rx hotpath 36 * Main location for the iflib Tx/Rx hotpath implementation. 44 /* Tx/Rx hotpath utility functions */ 69 static qidx_t ice_ift_queue_select(void *arg, struct mbuf *m, if_pkt_info_t pi); 78 /* Macro to help extract the NIC mode flexible Rx descriptor fields from the 79 * advanced 32byte Rx descriptor 410 ice_ift_queue_select(void * arg,struct mbuf * m,if_pkt_info_t pi) ice_ift_queue_select() argument [all...] |
/freebsd/sys/dev/nge/ |
H A D | if_nge.c | 1 /*- 2 * SPDX-License-Identifier: BSD-4-Clause 19 * 4. Neither the name of the author nor the names of any co-contributors 45 * sold by D-Link, Addtron, SMC and Asante. Both parts are 46 * virtually the same, except the 83820 is a 64-bit/32-bit part, 47 * while the 83821 is 32-bit only. 64 * ports. Other features include 8K TX FIFO and 32K RX FIFO, TCP/IP 66 * priority TX and RX queues, a 2048 bit multicast hash filter, 4 RX pattern 68 * moderation. The 83820 supports both 64-bit and 32-bit addressing 69 * and data transfers: the 64-bit support can be toggled on or off [all …]
|
/freebsd/sys/contrib/device-tree/src/arm/nxp/imx/ |
H A D | imx6qdl-dhcom-drc02.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 8 stdout-path = "serial0:115200n8"; 14 * pins SD3_DAT0 and SD3_DAT1 are muxed as can2 Tx and Rx. The signals for can2 15 * Tx and Rx are routed to the DHCOM UART1 rts/cts pins. Therefore the micro SD 26 * GPIO line, however the i.MX6 UART driver assumes RX happens 28 * line. Hence, the RX is always enabled here. 30 rs485-rx-en-hog { 31 gpio-hog; 33 line-name = "rs485-rx-en"; 34 output-low; [all …]
|
/freebsd/sys/contrib/device-tree/src/arm64/rockchip/ |
H A D | rk3588.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 #include "rk3588-pinctrl.dtsi" 11 compatible = "rockchip,rk3588-pcie3-phy-grf", "syscon"; 16 compatible = "rockchip,rk3588-pipe-phy-gr [all...] |
/freebsd/sys/dev/dwc/ |
H A D | dwc1000_dma.c | 1 /*- 5 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 65 /* TX descriptors - TDESC0 is almost unified */ 82 /* TX descriptors - TDESC0 extended format only */ 95 /* TX descriptors - TDESC1 normal format */ 106 /* TX descriptors - TDESC1 extended format */ 113 /* RX descriptor - RDESC0 is unified */ 134 #define RDESC0_RXMA (1U << 0) /* Rx MAC Address */ 136 /* RX descriptors - RDESC1 normal format */ 145 /* RX descriptors - RDESC1 enhanced format */ [all …]
|
/freebsd/sys/net80211/ |
H A D | ieee80211_input.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 63 ieee80211_process_mimo(struct ieee80211_node *ni, struct ieee80211_rx_stats *rx) in ieee80211_process_mimo() argument 68 if ((rx->r_flags & (IEEE80211_R_C_CHAIN | IEEE80211_R_C_NF | IEEE80211_R_C_RSSI)) != in ieee80211_process_mimo() 73 for (i = 0; i < MIN(rx->c_chain, IEEE80211_MAX_CHAINS); i++) { in ieee80211_process_mimo() 74 IEEE80211_RSSI_LPF(ni->ni_mimo_rssi_ctl[i], rx->c_rssi_ctl[i]); in ieee80211_process_mimo() 75 IEEE80211_RSSI_LPF(ni->ni_mimo_rssi_ext[i], rx->c_rssi_ext[i]); in ieee80211_process_mimo() 79 for(i = 0; i < MIN(rx->c_chain, IEEE80211_MAX_CHAINS); i++) { in ieee80211_process_mimo() 80 ni->ni_mimo_noise_ctl[i] = rx->c_nf_ctl[i]; in ieee80211_process_mimo() [all …]
|
/freebsd/sys/dev/et/ |
H A D | if_et.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 187 nitems(et_devices) - 1); 209 for (d = et_devices; d->desc != NULL; ++d) { in et_probe() 210 if (vid == d->vid && did == d->did) { in et_probe() 211 device_set_desc(dev, d->desc); in et_probe() 228 sc->dev = dev; in et_attach() 229 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, in et_attach() 231 callout_init_mtx(&sc->sc_tick, &sc->sc_mtx, 0); in et_attach() 233 ifp = sc->ifp = if_alloc(IFT_ETHER); in et_attach() [all …]
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_generic.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (C) 2013-2016 Vincenzo Maffione 5 * Copyright (C) 2013-2016 Luigi Rizzo 35 * have native support. TX and RX rings are emulated as follows: 63 * RX: 86 #define MBUF_RXQ(m) ((m)->m_pkthdr.flowid) argument 93 #define MBUF_TXQ(m) 0//((m)->m_pkthdr.flowid) argument 94 #define MBUF_RXQ(m) 0//((m)->m_pkthdr.flowid) argument 108 ifp->needed_tailroom, GFP_ATOMIC); in nm_os_get_mbuf() [all …]
|
H A D | netmap_kern.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (C) 2011-2014 Matteo Landi, Luigi Rizzo 5 * Copyright (C) 2013-2016 Universita` di Pisa 92 #define NM_MTX_T struct sx /* OS-specific mutex (sleepable) */ 93 #define NM_MTX_INIT(m) sx_init(&(m), #m) argument 94 #define NM_MTX_DESTROY(m) sx_destroy(&(m)) argument 95 #define NM_MTX_LOCK(m) sx_xlock(&(m)) argument 96 #define NM_MTX_SPINLOCK(m) while (!sx_try_xlock(&(m))) ; argument 97 #define NM_MTX_UNLOCK(m) sx_xunlock(&(m)) argument [all …]
|
/freebsd/sys/netpfil/ipfilter/netinet/ |
H A D | ip_rpcb_pxy.c | 2 * Copyright (C) 2002-2012 by Ryan Beasley <ryanb@goddamnbastard.org> 8 * This is an in-kernel application proxy for Sun's RPCBIND (nee portmap) 10 * lacking in less-likely corner cases, but it's definitely functional. 13 * rdr <int> <e_ip>/32 port <e_p> -> <i_ip> port <i_p> udp proxy rpcbu 30 * o Errors should be more fine-grained. (e.g., malloc failure vs. 94 * this started as BYTEREF -> BREF -> B.) 102 /* -------------------------------------------------------------------- */ 108 /* -------------------------------------------------------------------- */ 121 /* -------------------------------------------------------------------- */ 127 /* -------------------------------------------------------------------- */ [all …]
|
/freebsd/sys/dev/sge/ |
H A D | if_sge.c | 1 /*- 2 * SPDX-License-Identifier: BSD-4-Clause 4 * Copyright (c) 2008-2010 Nikolay Denev <ndenev@gmail.com> 5 * Copyright (c) 2007-2008 Alexander Pohoyda <alexander.pohoyda@gmx.net> 20 * 4. Neither the name of the author nor the names of any co-contributors 44 * Masayuki Murayama and SiS 190/191 GNU/Linux driver by K.M. Liu 180 #define CSR_WRITE_4(sc, reg, val) bus_write_4(sc->sge_res, reg, val) 181 #define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->sge_res, reg, val) 182 #define CSR_WRITE_1(cs, reg, val) bus_write_1(sc->sge_res, reg, val) 184 #define CSR_READ_4(sc, reg) bus_read_4(sc->sge_res, reg) [all …]
|
/freebsd/sys/dev/age/ |
H A D | if_age.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 185 { -1, 0, 0 } 190 { -1, 0, 0 } 195 { -1, 0, 0 } 200 { -1, 0, 0 } 217 for (i = AGE_PHY_TIMEOUT; i > 0; i--) { in age_miibus_readreg() 225 device_printf(sc->age_dev, "phy read timeout : %d\n", reg); in age_miibus_readreg() 247 for (i = AGE_PHY_TIMEOUT; i > 0; i--) { in age_miibus_writereg() 255 device_printf(sc->age_dev, "phy write timeout : %d\n", reg); in age_miibus_writereg() [all …]
|