/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 88 /* WoL Registers */ 95 /* WoL bits */ 143 struct ethtool_wolinfo wol; member 147 struct ethtool_wolinfo *wol) in dp83822_config_wol() argument 149 struct net_device *ndev = phydev->attached_dev; in dp83822_config_wol() 151 const u8 *mac; in dp83822_config_wol() local 153 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE)) { in dp83822_config_wol() 154 mac = (const u8 *)ndev->dev_addr; in dp83822_config_wol() 156 if (!is_valid_ether_addr(mac)) in dp83822_config_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_config_aneg() 160 if (dp83869->mode != DP83869_RGMII_1000_BASE) in dp83869_config_aneg() 168 struct dp83869_private *dp83869 = phydev->priv; in dp83869_read_status() 172 if (dp83869->mode == DP83869_RGMII_1000_BASE) in dp83869_read_status() 179 if (dp83869->mode == DP83869_RGMII_100_BASE) { in dp83869_read_status() 180 if (phydev->link) { in dp83869_read_status() 181 phydev->speed = SPEED_100; 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> 210 struct ethtool_wolinfo *wol) in dp83867_set_wol() argument 212 struct net_device *ndev = phydev->attached_dev; in dp83867_set_wol() 214 const u8 *mac; in dp83867_set_wol() local 219 if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST | in dp83867_set_wol() 224 if (wol->wolopts & WAKE_MAGIC) { in dp83867_set_wol() 225 mac = (const u8 *)ndev->dev_addr; in dp83867_set_wol() 227 if (!is_valid_ether_addr(mac)) in dp83867_set_wol() [all …]
|
H A D | mxl-gpy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 53 #define PHY_IMASK_WOL BIT(15) /* Wake-on-LAN */ 54 #define PHY_IMASK_ANC BIT(10) /* Auto-Neg complete */ 55 #define PHY_IMASK_ADSC BIT(5) /* Link auto-downspeed detect */ 117 /* WoL */ 136 * it can safely re-enter loopback mode. Record the time when 156 * T = -2.5761e-11*(N^4) + 9.7332e-8*(N^3) + -1.9165e-4*(N^2) + 157 * 3.0762e-1*(N^1) + -5.2156e1 159 * where [-52.156, 137.961]C and N = [0, 1023]. 168 * T = -25761e-12*(N^4) + 97332e-9*(N^3) + -191650e-6*(N^2) + [all …]
|
/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 …]
|
/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() 45 if (dev->phydev) in bcmgenet_get_wol() 46 phy_ethtool_get_wol(dev->phydev, wol); in bcmgenet_get_wol() 48 /* MAC is not wake-up capable, return what the PHY does */ in bcmgenet_get_wol() 52 /* Overlay MAC capabilities with that of the PHY queried before */ in bcmgenet_get_wol() [all …]
|
/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 …]
|
H A D | snps,dwmac.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Synopsys DesignWare MAC 10 - Alexandre Torgue <alexandre.torgue@foss.st.com> 11 - Giuseppe Cavallaro <peppe.cavallaro@st.com> 12 - Jose Abreu <joabreu@synopsys.com> 23 - snps,dwmac 24 - snps,dwmac-3.40a 25 - snps,dwmac-3.50a [all …]
|
/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 …]
|
/linux/drivers/net/phy/qcom/ |
H A D | qcom-phy-lib.c | 1 // SPDX-License-Identifier: GPL-2.0 60 struct ethtool_wolinfo *wol) in at803x_set_wol() argument 64 if (wol->wolopts & WAKE_MAGIC) { in at803x_set_wol() 65 struct net_device *ndev = phydev->attached_dev; in at803x_set_wol() 66 const u8 *mac; in at803x_set_wol() local 75 return -ENODEV; in at803x_set_wol() 77 mac = (const u8 *)ndev->dev_addr; in at803x_set_wol() 79 if (!is_valid_ether_addr(mac)) in at803x_set_wol() 80 return -EINVAL; in at803x_set_wol() 84 mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); in at803x_set_wol() [all …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 - 19 - 20 name: header-flags 22 entries: [ compact-bitsets, omit-reply, stats ] [all …]
|
/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 …]
|
/linux/drivers/net/ethernet/sun/ |
H A D | sungem.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Support for Apple GMAC and assorted PHYs, WOL, Power Management 30 #include <linux/dma-mapping.h> 93 * they only support 10/100 speeds. -DaveM 96 * the BCM54xx PHYs. -BenH 127 writel(cmd, gp->regs + MIF_FRAME); in __sungem_phy_read() 129 while (--limit) { in __sungem_phy_read() 130 cmd = readl(gp->regs + MIF_FRAME); in __sungem_phy_read() 151 return __sungem_phy_read(gp, gp->mii_phy_addr, reg); in sungem_phy_read() 165 writel(cmd, gp->regs + MIF_FRAME); in __sungem_phy_write() [all …]
|
/linux/drivers/net/ethernet/emulex/benet/ |
H A D | be_ethtool.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2005 - 2016 Broadcom 7 * linux-drivers@emulex.com 79 * minimum-sized (64b) frames in the receive path. 169 /* This counter is incremented when MAC or VLAN spoof checking is 179 /* This counter is incremented when the HW detects Q-in-Q style VLAN 205 "MAC Loopback test", 223 strscpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver)); in be_get_drvinfo() 224 if (!memcmp(adapter->fw_ver, adapter->fw_on_flash, FW_VER_LEN)) in be_get_drvinfo() 225 strscpy(drvinfo->fw_version, adapter->fw_ver, in be_get_drvinfo() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | en_ethtool.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 57 for (i = 0; i < priv->tx_ring_num[t]; i++) { in mlx4_en_moderation_update() 58 priv->tx_cq[t][i]->moder_cnt = priv->tx_frames; in mlx4_en_moderation_update() 59 priv->tx_cq[t][i]->moder_time = priv->tx_usecs; in mlx4_en_moderation_update() 60 if (priv->port_up) { in mlx4_en_moderation_update() 62 priv->tx_cq[t][i]); in mlx4_en_moderation_update() 69 if (priv->adaptive_rx_coal) in mlx4_en_moderation_update() 72 for (i = 0; i < priv->rx_ring_num; i++) { in mlx4_en_moderation_update() 73 priv->rx_cq[i]->moder_cnt = priv->rx_frames; in mlx4_en_moderation_update() [all …]
|
/linux/drivers/net/ethernet/sis/ |
H A D | sis900.c | 17 SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution, 25 Rev 1.08.05 Jun. 6 2002 Mufasa Yang bug fix for read_eeprom & Tx descriptor over-boundary 28 Rev 1.08.02 Nov. 30 2001 Hui-Fen Hsu workaround for EDB & bug fix for dhcp problem 29 Rev 1.08.01 Aug. 25 2001 Hui-Fen Hsu update for 630ET & workaround for ICS1893 PHY 30 Rev 1.08.00 Jun. 11 2001 Hui-Fen Hsu workaround for RTL8201 PHY and some bug fix 31 …Rev 1.07.11 Apr. 2 2001 Hui-Fen Hsu updates PCI drivers to use the new pci_set_dma_mask for kerne… 32 Rev 1.07.10 Mar. 1 2001 Hui-Fen Hsu <hfhsu@sis.com.tw> some bug fix & 635M/B support 34 Rev 1.07.08 Jan. 8 2001 Lei-Chun Chang added RTL8201 PHY support 35 …Rev 1.07.07 Nov. 29 2000 Lei-Chun Chang added kernel-doc extractable documentation and 630 workaro… 38 Rev 1.07.04 Sep. 6 2000 Lei-Chun Chang added ICS1893 PHY support [all …]
|
/linux/drivers/net/ethernet/marvell/ |
H A D | skge.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 133 CS_CLK_RUN_HOT = 1<<13,/* CLK_RUN hot m. (YUKON-Lite only) */ 134 CS_CLK_RUN_RST = 1<<12,/* CLK_RUN reset (YUKON-Lite only) */ 135 CS_CLK_RUN_ENA = 1<<11,/* CLK_RUN enable (YUKON-Lite only) */ 178 IS_MAC1 = 1<<21, /* IRQ from MAC 1 */ 179 IS_LNK_SYNC_M1 = 1<<20, /* Link Sync Cnt wrap MAC 1 */ 180 IS_MAC2 = 1<<19, /* IRQ from MAC 2 */ 181 IS_LNK_SYNC_M2 = 1<<18, /* Link Sync Cnt wrap MAC 2 */ 221 IS_NO_STAT_M1 = 1<<9, /* No Rx Status from MAC 1 */ 222 IS_NO_STAT_M2 = 1<<8, /* No Rx Status from MAC 2 */ [all …]
|