/openbmc/linux/drivers/net/phy/ |
H A D | dp83tc811.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 57 /* WoL Registers */ 64 /* WoL bits */ 98 struct ethtool_wolinfo *wol) in dp83811_set_wol() argument 100 struct net_device *ndev = phydev->attached_dev; in dp83811_set_wol() 101 const u8 *mac; in dp83811_set_wol() local 104 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83811_set_wol() 105 mac = (const u8 *)ndev->dev_addr; in dp83811_set_wol() 107 if (!is_valid_ether_addr(mac)) in dp83811_set_wol() [all …]
|
H A D | dp83822.c | 1 // SPDX-License-Identifier: GPL-2.0 83 /* WoL Registers */ 90 /* WoL bits */ 124 struct ethtool_wolinfo *wol) in dp83822_set_wol() argument 126 struct net_device *ndev = phydev->attached_dev; in dp83822_set_wol() 128 const u8 *mac; in dp83822_set_wol() local 130 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83822_set_wol() 131 mac = (const u8 *)ndev->dev_addr; in dp83822_set_wol() 133 if (!is_valid_ether_addr(mac)) in dp83822_set_wol() 134 return -EINVAL; in dp83822_set_wol() [all …]
|
H A D | dp83869.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include <dt-bindings/net/ti-dp83869.h> 70 /* This is the same bit mask as the BMCR so re-use the BMCR default */ 158 struct dp83869_private *dp83869 = phydev->priv; in dp83869_read_status() 165 if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) { in dp83869_read_status() 166 if (phydev->link) { in dp83869_read_status() 167 if (dp83869->mode == DP83869_RGMII_100_BASE) in dp83869_read_status() 168 phydev->speed = SPEED_100; in dp83869_read_status() 170 phydev->speed = SPEED_UNKNOWN; in dp83869_read_status() 171 phydev->duplex = DUPLEX_UNKNOWN; in dp83869_read_status() [all …]
|
H A D | dp83867.c | 1 // SPDX-License-Identifier: GPL-2.0 17 #include <linux/nvmem-consumer.h> 19 #include <dt-bindings/net/ti-dp83867.h> 192 struct ethtool_wolinfo *wol) in dp83867_set_wol() argument 194 struct net_device *ndev = phydev->attached_dev; in dp83867_set_wol() 196 const u8 *mac; in dp83867_set_wol() local 201 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83867_set_wol() 206 if (wol->wolopts & WAKE_MAGIC) { in dp83867_set_wol() 207 mac = (const u8 *)ndev->dev_addr; in dp83867_set_wol() 209 if (!is_valid_ether_addr(mac)) in dp83867_set_wol() [all …]
|
H A D | bcm-phy-lib.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2015-2017 Broadcom 6 #include "bcm-phy-lib.h" 192 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in bcm_phy_config_intr() 359 if (phydev->autoneg == AUTONEG_ENABLE) in bcm_phy_enable_apd() 367 /* Enable Auto Power-Down (APD) for the PHY */ in bcm_phy_enable_apd() 394 phydev->supported)) in bcm_phy_set_eee() 397 phydev->supported)) in bcm_phy_set_eee() 448 if (count - BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET > in bcm_phy_downshift_set() 451 return -ERANGE; in bcm_phy_downshift_set() [all …]
|
H A D | smsc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 /* Vendor-specific PHY Definitions */ 70 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in smsc_phy_config_intr() 91 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_edpd() 93 if (priv->edpd_enable) in smsc_phy_config_edpd() 107 if (irq_status != -ENODEV) in smsc_phy_handle_interrupt() 124 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_init() 130 if (!priv->edpd_mode_set_by_user && phydev->irq != PHY_POLL) in smsc_phy_config_init() 131 priv->edpd_enable = false; in smsc_phy_config_init() 161 switch (phydev->mdix_ctrl) { in lan87xx_config_aneg() [all …]
|
H A D | mxl-gpy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 52 #define PHY_IMASK_WOL BIT(15) /* Wake-on-LAN */ 53 #define PHY_IMASK_ANC BIT(10) /* Auto-Neg complete */ 54 #define PHY_IMASK_ADSC BIT(5) /* Link auto-downspeed detect */ 94 /* WoL */ 113 * it can safely re-enter loopback mode. Record the time when 133 * T = -2.5761e-11*(N^4) + 9.7332e-8*(N^3) + -1.9165e-4*(N^2) + 134 * 3.0762e-1*(N^1) + -5.2156e1 136 * where [-52.156, 137.961]C and N = [0, 1023]. 145 * T = -25761e-12*(N^4) + 97332e-9*(N^3) + -191650e-6*(N^2) + [all …]
|
/openbmc/linux/drivers/net/ethernet/oki-semi/pch_gbe/ |
H A D | pch_gbe_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 1999 - 2010 Intel Corporation. 14 * pch_gbe_stats - Stats item information 30 * pch_gbe_gstrings_stats - ethtool information status name list 67 * pch_gbe_get_link_ksettings - Get device-specific settings 80 mii_ethtool_get_link_ksettings(&adapter->mii, ecmd); in pch_gbe_get_link_ksettings() 83 ecmd->link_modes.supported); in pch_gbe_get_link_ksettings() 85 ecmd->link_modes.advertising); in pch_gbe_get_link_ksettings() 90 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.supported, in pch_gbe_get_link_ksettings() 92 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.advertising, in pch_gbe_get_link_ksettings() [all …]
|
/openbmc/linux/drivers/net/ethernet/broadcom/genet/ |
H A D | bcmgenet_wol.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Broadcom GENET (Gigabit Ethernet) Wake-on-LAN support 5 * Copyright (c) 2014-2024 Broadcom 37 /* ethtool function - get WOL (Wake on LAN) settings, Only Magic Packet 40 void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) in bcmgenet_get_wol() argument 43 struct device *kdev = &priv->pdev->dev; in bcmgenet_get_wol() 46 if (dev->phydev) { in bcmgenet_get_wol() 47 phy_ethtool_get_wol(dev->phydev, wol); in bcmgenet_get_wol() 48 phy_wolopts = wol->wolopts; in bcmgenet_get_wol() 51 /* MAC is not wake-up capable, return what the PHY does */ in bcmgenet_get_wol() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | mediatek-dwmac.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/mediatek-dwmac.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Biao Huang <biao.huang@mediatek.com> 21 - mediatek,mt2712-gmac 22 - mediatek,mt8188-gmac 23 - mediatek,mt8195-gmac 25 - compatible 28 - $ref: snps,dwmac.yaml# [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000e/ |
H A D | ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 28 "s0ix-enabled", 36 .sizeof_stat = sizeof(((struct e1000_adapter *)0)->m), \ 41 .sizeof_stat = sizeof(((struct rtnl_link_stats64 *)0)->m), \ 115 struct e1000_hw *hw = &adapter->hw; in e1000_get_link_ksettings() 117 if (hw->phy.media_type == e1000_media_type_copper) { in e1000_get_link_ksettings() 127 if (hw->phy.type == e1000_phy_ife) in e1000_get_link_ksettings() 131 if (hw->mac.autoneg == 1) { in e1000_get_link_ksettings() 134 advertising |= hw->phy.autoneg_advertised; in e1000_get_link_ksettings() [all …]
|
/openbmc/u-boot/net/ |
H A D | wol.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include "wol.h" 15 * Check incoming Wake-on-LAN packet for: 16 * - sync bytes 17 * - sixteen copies of the target MAC address 19 * @param wol Wake-on-LAN packet 22 static int wol_check_magic(struct wol_hdr *wol, unsigned int len) in wol_check_magic() argument 30 if (wol->wol_sync[i] != WOL_SYNC_BYTE) in wol_check_magic() 34 if (memcmp(&wol->wol_dest[i * ARP_HLEN], in wol_check_magic() 43 struct wol_hdr *wol; in wol_receive() local [all …]
|
H A D | wol.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * wol - Wake-on-LAN 5 * Supports both Wake-on-LAN packet types: 6 * - EtherType 0x0842 packets 7 * - UDP packets on ports 0, 7 and 9. 29 * Wake-on-LAN header 33 u8 wol_dest[WOL_MAC_REPETITIONS * ARP_HLEN]; /* 16x MAC */ 38 * Initialize wol (beginning of netloop) 43 * Check incoming Wake-on-LAN packet for: 44 * - sync bytes [all …]
|
/openbmc/linux/Documentation/networking/ |
H A D | sfp-phylink.rst | 1 .. SPDX-License-Identifier: GPL-2.0 10 phylink is a mechanism to support hot-pluggable networking modules 11 directly connected to a MAC without needing to re-initialise the 12 adapter on hot-plug events. 14 phylink supports conventional phylib-based setups, fixed link setups 26 the PHY, and pass them to the MAC driver. We expect the MAC driver 32 Fixed mode is the same as PHY mode as far as the MAC driver is 35 3. In-band mode 37 In-band mode is used with 802.3z, SGMII and similar interface modes, 38 and we are expecting to use and honor the in-band negotiation or [all …]
|
/openbmc/linux/drivers/net/ethernet/wangxun/ngbe/ |
H A D | ngbe_main.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */ 24 /* ngbe_pci_tbl - PCI Device ID Table 47 * ngbe_init_type_code - Initialize the shared code 55 wx->mac.type = wx_mac_em; in ngbe_init_type_code() 56 type_mask = (u16)(wx->subsystem_device_id & NGBE_OEM_MASK); in ngbe_init_type_code() 57 ncsi_mask = wx->subsystem_device_id & NGBE_NCSI_MASK; in ngbe_init_type_code() 58 wol_mask = wx->subsystem_device_id & NGBE_WOL_MASK; in ngbe_init_type_code() 61 wx->mac_type = (val & BIT(7)) >> 7 ? in ngbe_init_type_code() 65 wx->wol_hw_supported = (wol_mask == NGBE_WOL_SUP) ? 1 : 0; in ngbe_init_type_code() [all …]
|
/openbmc/linux/drivers/net/ethernet/socionext/ |
H A D | sni_ave.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * sni_ave.c - Socionext UniPhier AVE ethernet driver 5 * Copyright 2015-2017 Socionext Inc. 38 /* MAC Register Group */ 41 #define AVE_RXMAC1R 0x208 /* MAC address (lower) */ 42 #define AVE_RXMAC2R 0x20c /* MAC address (upper) */ 93 #define AVE_GRR_GRST BIT(0) /* Reset all MAC */ 118 #define AVE_RXCR_AFEN BIT(19) /* MAC address filter */ 176 #define AVE_PFNUM_MULTICAST 11 /* No.11-17 */ 209 #define IS_DESC_64BIT(p) ((p)->data->is_desc_64bit) [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0 117 ((((struct igc_adapter *)netdev_priv(netdev))->num_rx_queues * \ 119 (((struct igc_adapter *)netdev_priv(netdev))->num_tx_queues * \ 126 "legacy-rx", 135 struct igc_hw *hw = &adapter->hw; in igc_ethtool_get_drvinfo() 139 strscpy(drvinfo->driver, igc_driver_name, sizeof(drvinfo->driver)); in igc_ethtool_get_drvinfo() 142 hw->nvm.ops.read(hw, IGC_NVM_DEV_STARTER, 1, &nvm_version); in igc_ethtool_get_drvinfo() 147 scnprintf(adapter->fw_version, in igc_ethtool_get_drvinfo() 148 sizeof(adapter->fw_version), in igc_ethtool_get_drvinfo() 153 strscpy(drvinfo->fw_version, adapter->fw_version, in igc_ethtool_get_drvinfo() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 31 sizeof(((struct ixgbe_adapter *)0)->m), \ 34 sizeof(((struct rtnl_link_stats64 *)0)->m), \ 111 #define IXGBE_NUM_RX_QUEUES netdev->num_tx_queues 114 (netdev->num_tx_queues + IXGBE_NUM_RX_QUEUES) * \ 118 (sizeof(((struct ixgbe_adapter *)0)->stats.pxonrxc) + \ 119 sizeof(((struct ixgbe_adapter *)0)->stats.pxontxc) + \ 120 sizeof(((struct ixgbe_adapter *)0)->stats.pxoffrxc) + \ 121 sizeof(((struct ixgbe_adapter *)0)->stats.pxofftxc)) \ [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | igb_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 104 ((((struct igb_adapter *)netdev_priv(netdev))->num_rx_queues * \ 106 (((struct igb_adapter *)netdev_priv(netdev))->num_tx_queues * \ 130 "legacy-rx", 139 struct e1000_hw *hw = &adapter->hw; in igb_get_link_ksettings() 140 struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575; in igb_get_link_ksettings() 141 struct e1000_sfp_flags *eth_flags = &dev_spec->eth_flags; in igb_get_link_ksettings() 146 status = pm_runtime_suspended(&adapter->pdev->dev) ? in igb_get_link_ksettings() 148 if (hw->phy.media_type == e1000_media_type_copper) { in igb_get_link_ksettings() [all …]
|
/openbmc/qemu/hw/net/ |
H A D | sungem.c | 7 * Copyright 2017 Mark Cave-Ayland 12 #include "hw/qdev-properties.h" 44 #define GREG_STAT_TXMAC 0x00004000 /* TX MAC signalled interrupt */ 45 #define GREG_STAT_RXMAC 0x00008000 /* RX MAC signalled interrupt */ 46 #define GREG_STAT_MAC 0x00010000 /* MAC Control signalled irq */ 110 /* WOL Registers */ 119 /* MAC Registers */ 122 #define MAC_TXRST 0x0000UL /* TX MAC Software Reset Command */ 123 #define MAC_RXRST 0x0004UL /* RX MAC Software Reset Command */ 124 #define MAC_TXSTAT 0x0010UL /* TX MAC Status Register */ [all …]
|
/openbmc/linux/Documentation/networking/device_drivers/ethernet/intel/ |
H A D | igb.rst | 1 .. SPDX-License-Identifier: GPL-2.0+ 8 Copyright(c) 1999-2018 Intel Corporation. 13 - Identifying Your Adapter 14 - Command Line Parameters 15 - Additional Configurations 16 - Support 46 ------- 47 :Valid Range: 0-7 49 This parameter adds support for SR-IOV. It causes the driver to spawn up to 76 NOTE: When either SR-IOV mode or VMDq mode is enabled, hardware VLAN filtering [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/enetc/ |
H A D | enetc_ethtool.c | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2 /* Copyright 2017-2019 NXP */ 44 struct enetc_hw *hw = &priv->si->hw; in enetc_get_reglen() 48 len += ARRAY_SIZE(enetc_txbdr_regs) * priv->num_tx_rings; in enetc_get_reglen() 49 len += ARRAY_SIZE(enetc_rxbdr_regs) * priv->num_rx_rings; in enetc_get_reglen() 51 if (hw->port) in enetc_get_reglen() 54 if (hw->port && !!(priv->si->hw_features & ENETC_SI_F_QBU)) in enetc_get_reglen() 66 struct enetc_hw *hw = &priv->si->hw; in enetc_get_regs() 76 for (i = 0; i < priv->num_tx_rings; i++) { in enetc_get_regs() 85 for (i = 0; i < priv->num_rx_rings; i++) { in enetc_get_regs() [all …]
|
/openbmc/linux/Documentation/netlink/specs/ |
H A D | ethtool.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 5 protocol: genetlink-legacy 10 - 11 name: udp-tunnel-type 12 enum-name: 14 entries: [ vxlan, geneve, vxlan-gpe ] 15 - 20 attribute-sets: 21 - 24 - [all …]
|
/openbmc/linux/drivers/net/ethernet/atheros/atlx/ |
H A D | atl2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright(c) 2006 - 2007 Atheros Corporation. All rights reserved. 4 * Copyright(c) 2007 - 2008 Chris Snook <csnook@redhat.com> 7 * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. 12 #include <linux/dma-mapping.h> 47 * atl2_pci_tbl - PCI Device ID Table 59 * atl2_sw_init - Initialize general software structures (struct atl2_adapter) 68 struct atl2_hw *hw = &adapter->hw; in atl2_sw_init() 69 struct pci_dev *pdev = adapter->pdev; in atl2_sw_init() 72 hw->vendor_id = pdev->vendor; in atl2_sw_init() [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/ |
H A D | ucc_geth_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 * Need to re-open the interface manually after changing some parameters. 24 #include <linux/dma-mapping.h> 37 "tx-64-frames", 38 "tx-65-127-frames", 39 "tx-128-255-frames", 40 "rx-64-frames", 41 "rx-65-127-frames", 42 "rx-128-255-frames", 43 "tx-bytes-ok", [all …]
|