Home
last modified time | relevance | path

Searched refs:ecmd (Results 1 – 25 of 41) sorted by relevance

12

/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_ethtool.c321 static int prestera_port_type_set(const struct ethtool_link_ksettings *ecmd, in prestera_port_type_set() argument
328 if (port_types[type].eth_type == ecmd->base.port && in prestera_port_type_set()
330 ecmd->link_modes.supported)) { in prestera_port_type_set()
337 if (type != port->caps.type && ecmd->base.autoneg == AUTONEG_ENABLE) in prestera_port_type_set()
411 static void prestera_port_supp_types_get(struct ethtool_link_ksettings *ecmd, in prestera_port_supp_types_get() argument
424 ecmd->link_modes.supported); in prestera_port_supp_types_get()
428 static void prestera_port_remote_cap_get(struct ethtool_link_ksettings *ecmd, in prestera_port_remote_cap_get() argument
446 prestera_modes_to_eth(ecmd->link_modes.lp_advertising, in prestera_port_remote_cap_get()
449 if (!bitmap_empty(ecmd->link_modes.lp_advertising, in prestera_port_remote_cap_get()
451 ethtool_link_ksettings_add_link_mode(ecmd, in prestera_port_remote_cap_get()
[all …]
/linux/drivers/net/
H A Dmii.c53 void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) in mii_ethtool_gset() argument
59 ecmd->supported = in mii_ethtool_gset()
64 ecmd->supported |= SUPPORTED_1000baseT_Half | in mii_ethtool_gset()
68 ecmd->port = PORT_MII; in mii_ethtool_gset()
71 ecmd->transceiver = XCVR_INTERNAL; in mii_ethtool_gset()
74 ecmd->phy_address = mii->phy_id; in mii_ethtool_gset()
75 ecmd->mdio_support = ETH_MDIO_SUPPORTS_C22; in mii_ethtool_gset()
77 ecmd->advertising = ADVERTISED_TP | ADVERTISED_MII; in mii_ethtool_gset()
86 ecmd->advertising |= mii_get_an(mii, MII_ADVERTISE); in mii_ethtool_gset()
88 ecmd->advertising |= in mii_ethtool_gset()
[all …]
/linux/drivers/net/ethernet/cisco/enic/
H A Denic_ethtool.c130 struct ethtool_link_ksettings *ecmd) in enic_get_ksettings() argument
133 struct ethtool_link_settings *base = &ecmd->base; in enic_get_ksettings()
135 ethtool_link_ksettings_add_link_mode(ecmd, supported, in enic_get_ksettings()
137 ethtool_link_ksettings_add_link_mode(ecmd, supported, FIBRE); in enic_get_ksettings()
138 ethtool_link_ksettings_add_link_mode(ecmd, advertising, in enic_get_ksettings()
140 ethtool_link_ksettings_add_link_mode(ecmd, advertising, FIBRE); in enic_get_ksettings()
372 struct ethtool_coalesce *ecmd, in enic_get_coalesce() argument
380 ecmd->tx_coalesce_usecs = enic->tx_coalesce_usecs; in enic_get_coalesce()
381 ecmd->rx_coalesce_usecs = enic->rx_coalesce_usecs; in enic_get_coalesce()
383 ecmd->use_adaptive_rx_coalesce = 1; in enic_get_coalesce()
[all …]
/linux/drivers/net/ethernet/oki-semi/pch_gbe/
H A Dpch_gbe_ethtool.c75 struct ethtool_link_ksettings *ecmd) in pch_gbe_get_link_ksettings() argument
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()
96 ecmd->base.speed = SPEED_UNKNOWN; in pch_gbe_get_link_ksettings()
110 const struct ethtool_link_ksettings *ecmd) in pch_gbe_set_link_ksettings() argument
115 u32 speed = ecmd->base.speed; in pch_gbe_set_link_ksettings()
121 memcpy(&copy_ecmd, ecmd, sizeof(*ecmd)); in pch_gbe_set_link_ksettings()
/linux/drivers/net/ethernet/cavium/liquidio/
H A Dlio_ethtool.c216 struct ethtool_link_ksettings *ecmd) in lio_get_link_ksettings() argument
224 ethtool_link_ksettings_zero_link_mode(ecmd, supported); in lio_get_link_ksettings()
225 ethtool_link_ksettings_zero_link_mode(ecmd, advertising); in lio_get_link_ksettings()
229 ecmd->base.port = PORT_TP; in lio_get_link_ksettings()
230 ecmd->base.autoneg = AUTONEG_DISABLE; in lio_get_link_ksettings()
231 ethtool_link_ksettings_add_link_mode(ecmd, supported, TP); in lio_get_link_ksettings()
232 ethtool_link_ksettings_add_link_mode(ecmd, supported, Pause); in lio_get_link_ksettings()
233 ethtool_link_ksettings_add_link_mode(ecmd, supported, in lio_get_link_ksettings()
236 ethtool_link_ksettings_add_link_mode(ecmd, advertising, Pause); in lio_get_link_ksettings()
237 ethtool_link_ksettings_add_link_mode(ecmd, advertising, in lio_get_link_ksettings()
[all …]
/linux/drivers/net/ethernet/natsemi/
H A Dnatsemi.c644 struct ethtool_link_ksettings *ecmd);
646 const struct ethtool_link_ksettings *ecmd);
2584 struct ethtool_link_ksettings *ecmd) in get_link_ksettings() argument
2588 netdev_get_ecmd(dev, ecmd); in get_link_ksettings()
2594 const struct ethtool_link_ksettings *ecmd) in set_link_ksettings() argument
2599 res = netdev_set_ecmd(dev, ecmd); in set_link_ksettings()
2830 struct ethtool_link_ksettings *ecmd) in netdev_get_ecmd() argument
2836 ecmd->base.port = dev->if_port; in netdev_get_ecmd()
2837 ecmd->base.speed = np->speed; in netdev_get_ecmd()
2838 ecmd->base.duplex = np->duplex; in netdev_get_ecmd()
[all …]
/linux/drivers/net/usb/
H A Drtl8150.c778 struct ethtool_link_ksettings *ecmd) in rtl8150_get_link_ksettings() argument
791 ecmd->base.port = PORT_TP; in rtl8150_get_link_ksettings()
792 ecmd->base.phy_address = dev->phy; in rtl8150_get_link_ksettings()
798 ecmd->base.speed = speed; in rtl8150_get_link_ksettings()
799 ecmd->base.autoneg = AUTONEG_ENABLE; in rtl8150_get_link_ksettings()
801 ecmd->base.duplex = (lpa & LPA_100FULL) ? in rtl8150_get_link_ksettings()
804 ecmd->base.duplex = (lpa & LPA_10FULL) ? in rtl8150_get_link_ksettings()
807 ecmd->base.autoneg = AUTONEG_DISABLE; in rtl8150_get_link_ksettings()
808 ecmd->base.speed = ((bmcr & BMCR_SPEED100) ? in rtl8150_get_link_ksettings()
810 ecmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in rtl8150_get_link_ksettings()
[all …]
H A Dch9200.c215 struct ethtool_cmd ecmd; in ch9200_link_reset() local
218 mii_ethtool_gset(&dev->mii, &ecmd); in ch9200_link_reset()
221 __func__, ecmd.speed, ecmd.duplex); in ch9200_link_reset()
H A Dasix_devices.c174 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET }; in ax88172_link_reset() local
177 mii_ethtool_gset(&dev->mii, &ecmd); in ax88172_link_reset()
180 if (ecmd.duplex != DUPLEX_FULL) in ax88172_link_reset()
184 ethtool_cmd_speed(&ecmd), ecmd.duplex, mode); in ax88172_link_reset()
1152 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET }; in ax88178_link_reset() local
1159 mii_ethtool_gset(&dev->mii, &ecmd); in ax88178_link_reset()
1161 speed = ethtool_cmd_speed(&ecmd); in ax88178_link_reset()
1172 if (ecmd.duplex == DUPLEX_FULL) in ax88178_link_reset()
1178 speed, ecmd.duplex, mode); in ax88178_link_reset()
H A Dsr9800.c536 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET }; in sr9800_link_reset() local
540 mii_ethtool_gset(&dev->mii, &ecmd); in sr9800_link_reset()
543 if (ethtool_cmd_speed(&ecmd) != SPEED_100) in sr9800_link_reset()
546 if (ecmd.duplex != DUPLEX_FULL) in sr9800_link_reset()
550 __func__, ethtool_cmd_speed(&ecmd), ecmd.duplex, mode); in sr9800_link_reset()
H A Dsr9700.c515 struct ethtool_cmd ecmd; in sr9700_link_reset() local
518 mii_ethtool_gset(&dev->mii, &ecmd); in sr9700_link_reset()
521 ecmd.speed, ecmd.duplex); in sr9700_link_reset()
H A Ddm9601.c555 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET }; in dm9601_link_reset() local
558 mii_ethtool_gset(&dev->mii, &ecmd); in dm9601_link_reset()
561 ethtool_cmd_speed(&ecmd), ecmd.duplex); in dm9601_link_reset()
/linux/drivers/net/ethernet/smsc/
H A Dsmc91c92_cs.c1850 struct ethtool_link_ksettings *ecmd) in smc_netdev_get_ecmd() argument
1861 ecmd->base.port = (tmp & CFG_AUI_SELECT) ? PORT_AUI : PORT_TP; in smc_netdev_get_ecmd()
1862 ecmd->base.speed = SPEED_10; in smc_netdev_get_ecmd()
1863 ecmd->base.phy_address = ioaddr + MGMT; in smc_netdev_get_ecmd()
1867 ecmd->base.duplex = (tmp & TCR_FDUPLX) ? DUPLEX_FULL : DUPLEX_HALF; in smc_netdev_get_ecmd()
1869 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.supported, in smc_netdev_get_ecmd()
1874 const struct ethtool_link_ksettings *ecmd) in smc_netdev_set_ecmd() argument
1879 if (ecmd->base.speed != SPEED_10) in smc_netdev_set_ecmd()
1881 if (ecmd->base.duplex != DUPLEX_HALF && in smc_netdev_set_ecmd()
1882 ecmd->base.duplex != DUPLEX_FULL) in smc_netdev_set_ecmd()
[all …]
/linux/drivers/net/ethernet/ti/icssg/
H A Dicssg_ethtool.c37 struct ethtool_link_ksettings *ecmd) in emac_get_link_ksettings() argument
39 return phy_ethtool_get_link_ksettings(ndev, ecmd); in emac_get_link_ksettings()
43 const struct ethtool_link_ksettings *ecmd) in emac_set_link_ksettings() argument
45 return phy_ethtool_set_link_ksettings(ndev, ecmd); in emac_set_link_ksettings()
/linux/drivers/net/ethernet/
H A Djme.c2388 struct ethtool_coalesce *ecmd, in jme_get_coalesce() argument
2394 ecmd->tx_coalesce_usecs = PCC_TX_TO; in jme_get_coalesce()
2395 ecmd->tx_max_coalesced_frames = PCC_TX_CNT; in jme_get_coalesce()
2398 ecmd->use_adaptive_rx_coalesce = false; in jme_get_coalesce()
2399 ecmd->rx_coalesce_usecs = 0; in jme_get_coalesce()
2400 ecmd->rx_max_coalesced_frames = 0; in jme_get_coalesce()
2404 ecmd->use_adaptive_rx_coalesce = true; in jme_get_coalesce()
2408 ecmd->rx_coalesce_usecs = PCC_P1_TO; in jme_get_coalesce()
2409 ecmd->rx_max_coalesced_frames = PCC_P1_CNT; in jme_get_coalesce()
2412 ecmd->rx_coalesce_usecs = PCC_P2_TO; in jme_get_coalesce()
[all …]
/linux/drivers/net/vmxnet3/
H A Dvmxnet3_ethtool.c643 struct ethtool_link_ksettings *ecmd) in vmxnet3_get_link_ksettings() argument
647 ethtool_link_ksettings_zero_link_mode(ecmd, supported); in vmxnet3_get_link_ksettings()
648 ethtool_link_ksettings_add_link_mode(ecmd, supported, 10000baseT_Full); in vmxnet3_get_link_ksettings()
649 ethtool_link_ksettings_add_link_mode(ecmd, supported, 1000baseT_Full); in vmxnet3_get_link_ksettings()
650 ethtool_link_ksettings_add_link_mode(ecmd, supported, TP); in vmxnet3_get_link_ksettings()
651 ethtool_link_ksettings_zero_link_mode(ecmd, advertising); in vmxnet3_get_link_ksettings()
652 ethtool_link_ksettings_add_link_mode(ecmd, advertising, TP); in vmxnet3_get_link_ksettings()
653 ecmd->base.port = PORT_TP; in vmxnet3_get_link_ksettings()
656 ecmd->base.speed = adapter->link_speed; in vmxnet3_get_link_ksettings()
657 ecmd->base.duplex = DUPLEX_FULL; in vmxnet3_get_link_ksettings()
[all …]
/linux/drivers/scsi/fcoe/
H A Dfcoe_transport.c120 struct ethtool_link_ksettings ecmd; in fcoe_link_speed_update() local
122 if (!__ethtool_get_link_ksettings(netdev, &ecmd)) { in fcoe_link_speed_update()
128 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
134 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
141 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
146 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
153 lport->link_speed = eth2fc_speed(ecmd.base.speed); in fcoe_link_speed_update()
/linux/net/bridge/
H A Dbr_device.c262 struct ethtool_link_ksettings ecmd; in br_get_link_ksettings() local
268 if (__ethtool_get_link_ksettings(pdev, &ecmd)) in br_get_link_ksettings()
271 if (ecmd.base.speed == (__u32)SPEED_UNKNOWN) in br_get_link_ksettings()
275 cmd->base.speed < ecmd.base.speed) in br_get_link_ksettings()
276 cmd->base.speed = ecmd.base.speed; in br_get_link_ksettings()
H A Dbr_if.c37 struct ethtool_link_ksettings ecmd; in port_cost() local
39 if (!__ethtool_get_link_ksettings(dev, &ecmd)) { in port_cost()
40 switch (ecmd.base.speed) { in port_cost()
56 if (ecmd.base.speed > SPEED_10000) in port_cost()
/linux/drivers/net/ethernet/marvell/
H A Dsky2.c4013 struct ethtool_pauseparam *ecmd) in sky2_get_pauseparam() argument
4019 ecmd->tx_pause = ecmd->rx_pause = 0; in sky2_get_pauseparam()
4022 ecmd->tx_pause = 1, ecmd->rx_pause = 0; in sky2_get_pauseparam()
4025 ecmd->tx_pause = 0, ecmd->rx_pause = 1; in sky2_get_pauseparam()
4028 ecmd->tx_pause = ecmd->rx_pause = 1; in sky2_get_pauseparam()
4031 ecmd->autoneg = (sky2->flags & SKY2_FLAG_AUTO_PAUSE) in sky2_get_pauseparam()
4036 struct ethtool_pauseparam *ecmd) in sky2_set_pauseparam() argument
4040 if (ecmd->autoneg == AUTONEG_ENABLE) in sky2_set_pauseparam()
4045 sky2->flow_mode = sky2_flow(ecmd->rx_pause, ecmd->tx_pause); in sky2_set_pauseparam()
4054 struct ethtool_coalesce *ecmd, in sky2_get_coalesce() argument
[all …]
/linux/drivers/net/ethernet/rocker/
H A Drocker_main.c1118 struct ethtool_link_ksettings *ecmd = priv; in rocker_cmd_get_port_settings_ethtool_proc() local
1140 ethtool_link_ksettings_zero_link_mode(ecmd, supported); in rocker_cmd_get_port_settings_ethtool_proc()
1141 ethtool_link_ksettings_add_link_mode(ecmd, supported, TP); in rocker_cmd_get_port_settings_ethtool_proc()
1143 ecmd->base.phy_address = 0xff; in rocker_cmd_get_port_settings_ethtool_proc()
1144 ecmd->base.port = PORT_TP; in rocker_cmd_get_port_settings_ethtool_proc()
1145 ecmd->base.speed = speed; in rocker_cmd_get_port_settings_ethtool_proc()
1146 ecmd->base.duplex = duplex ? DUPLEX_FULL : DUPLEX_HALF; in rocker_cmd_get_port_settings_ethtool_proc()
1147 ecmd->base.autoneg = autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; in rocker_cmd_get_port_settings_ethtool_proc()
1254 struct ethtool_link_ksettings *ecmd = priv; in rocker_cmd_set_port_settings_ethtool_prep() local
1267 ecmd->base.speed)) in rocker_cmd_set_port_settings_ethtool_prep()
[all …]
/linux/drivers/net/ethernet/emulex/benet/
H A Dbe_ethtool.c699 be_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) in be_get_pauseparam() argument
703 be_cmd_get_flow_control(adapter, &ecmd->tx_pause, &ecmd->rx_pause); in be_get_pauseparam()
704 ecmd->autoneg = adapter->phy.fc_autoneg; in be_get_pauseparam()
708 be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) in be_set_pauseparam() argument
713 if (ecmd->autoneg != adapter->phy.fc_autoneg) in be_set_pauseparam()
716 status = be_cmd_set_flow_control(adapter, ecmd->tx_pause, in be_set_pauseparam()
717 ecmd->rx_pause); in be_set_pauseparam()
723 adapter->tx_fc = ecmd->tx_pause; in be_set_pauseparam()
724 adapter->rx_fc = ecmd->rx_pause; in be_set_pauseparam()
/linux/drivers/net/ethernet/tehuti/
H A Dtehuti.c2107 struct ethtool_link_ksettings *ecmd) in bdx_get_link_ksettings() argument
2109 ethtool_link_ksettings_zero_link_mode(ecmd, supported); in bdx_get_link_ksettings()
2110 ethtool_link_ksettings_add_link_mode(ecmd, supported, in bdx_get_link_ksettings()
2112 ethtool_link_ksettings_add_link_mode(ecmd, supported, FIBRE); in bdx_get_link_ksettings()
2113 ethtool_link_ksettings_zero_link_mode(ecmd, advertising); in bdx_get_link_ksettings()
2114 ethtool_link_ksettings_add_link_mode(ecmd, advertising, in bdx_get_link_ksettings()
2116 ethtool_link_ksettings_add_link_mode(ecmd, advertising, FIBRE); in bdx_get_link_ksettings()
2118 ecmd->base.speed = SPEED_10000; in bdx_get_link_ksettings()
2119 ecmd->base.duplex = DUPLEX_FULL; in bdx_get_link_ksettings()
2120 ecmd->base.port = PORT_FIBRE; in bdx_get_link_ksettings()
[all …]
/linux/drivers/net/ethernet/amd/
H A Dpcnet32.c2195 struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET }; in pcnet32_open() local
2208 ecmd.port = PORT_MII; in pcnet32_open()
2209 ecmd.transceiver = XCVR_INTERNAL; in pcnet32_open()
2210 ecmd.autoneg = AUTONEG_DISABLE; in pcnet32_open()
2211 ethtool_cmd_speed_set(&ecmd, in pcnet32_open()
2217 ecmd.duplex = DUPLEX_FULL; in pcnet32_open()
2220 ecmd.duplex = DUPLEX_HALF; in pcnet32_open()
2240 ecmd.phy_address = i; in pcnet32_open()
2242 mii_ethtool_gset(&lp->mii_if, &ecmd); in pcnet32_open()
2243 ecmd.autoneg = AUTONEG_ENABLE; in pcnet32_open()
[all …]
/linux/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_83xx_hw.c3301 struct ethtool_link_ksettings *ecmd) in qlcnic_83xx_get_link_ksettings() argument
3320 ecmd->base.speed = ahw->link_speed; in qlcnic_83xx_get_link_ksettings()
3321 ecmd->base.duplex = ahw->link_duplex; in qlcnic_83xx_get_link_ksettings()
3322 ecmd->base.autoneg = ahw->link_autoneg; in qlcnic_83xx_get_link_ksettings()
3324 ecmd->base.speed = SPEED_UNKNOWN; in qlcnic_83xx_get_link_ksettings()
3325 ecmd->base.duplex = DUPLEX_UNKNOWN; in qlcnic_83xx_get_link_ksettings()
3326 ecmd->base.autoneg = AUTONEG_DISABLE; in qlcnic_83xx_get_link_ksettings()
3336 ecmd->link_modes.advertising); in qlcnic_83xx_get_link_ksettings()
3338 if (ecmd->base.autoneg == AUTONEG_ENABLE) { in qlcnic_83xx_get_link_ksettings()
3373 ecmd->base.port = PORT_FIBRE; in qlcnic_83xx_get_link_ksettings()
[all …]

12