Lines Matching refs:ecmd

3602 static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)  in sky2_get_settings()  argument
3607 ecmd->transceiver = XCVR_INTERNAL; in sky2_get_settings()
3608 ecmd->supported = sky2_supported_modes(hw); in sky2_get_settings()
3609 ecmd->phy_address = PHY_ADDR_MARV; in sky2_get_settings()
3611 ecmd->port = PORT_TP; in sky2_get_settings()
3612 ethtool_cmd_speed_set(ecmd, sky2->speed); in sky2_get_settings()
3613 ecmd->supported |= SUPPORTED_Autoneg | SUPPORTED_TP; in sky2_get_settings()
3615 ethtool_cmd_speed_set(ecmd, SPEED_1000); in sky2_get_settings()
3616 ecmd->port = PORT_FIBRE; in sky2_get_settings()
3617 ecmd->supported |= SUPPORTED_Autoneg | SUPPORTED_FIBRE; in sky2_get_settings()
3620 ecmd->advertising = sky2->advertising; in sky2_get_settings()
3621 ecmd->autoneg = (sky2->flags & SKY2_FLAG_AUTO_SPEED) in sky2_get_settings()
3623 ecmd->duplex = sky2->duplex; in sky2_get_settings()
3627 static int sky2_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) in sky2_set_settings() argument
3633 if (ecmd->autoneg == AUTONEG_ENABLE) { in sky2_set_settings()
3634 if (ecmd->advertising & ~supported) in sky2_set_settings()
3638 sky2->advertising = ecmd->advertising | in sky2_set_settings()
3642 sky2->advertising = ecmd->advertising | in sky2_set_settings()
3651 u32 speed = ethtool_cmd_speed(ecmd); in sky2_set_settings()
3655 if (ecmd->duplex == DUPLEX_FULL) in sky2_set_settings()
3657 else if (ecmd->duplex == DUPLEX_HALF) in sky2_set_settings()
3663 if (ecmd->duplex == DUPLEX_FULL) in sky2_set_settings()
3665 else if (ecmd->duplex == DUPLEX_HALF) in sky2_set_settings()
3672 if (ecmd->duplex == DUPLEX_FULL) in sky2_set_settings()
3674 else if (ecmd->duplex == DUPLEX_HALF) in sky2_set_settings()
3687 sky2->duplex = ecmd->duplex; in sky2_set_settings()
4029 struct ethtool_pauseparam *ecmd) in sky2_get_pauseparam() argument
4035 ecmd->tx_pause = ecmd->rx_pause = 0; in sky2_get_pauseparam()
4038 ecmd->tx_pause = 1, ecmd->rx_pause = 0; in sky2_get_pauseparam()
4041 ecmd->tx_pause = 0, ecmd->rx_pause = 1; in sky2_get_pauseparam()
4044 ecmd->tx_pause = ecmd->rx_pause = 1; in sky2_get_pauseparam()
4047 ecmd->autoneg = (sky2->flags & SKY2_FLAG_AUTO_PAUSE) in sky2_get_pauseparam()
4052 struct ethtool_pauseparam *ecmd) in sky2_set_pauseparam() argument
4056 if (ecmd->autoneg == AUTONEG_ENABLE) in sky2_set_pauseparam()
4061 sky2->flow_mode = sky2_flow(ecmd->rx_pause, ecmd->tx_pause); in sky2_set_pauseparam()
4070 struct ethtool_coalesce *ecmd) in sky2_get_coalesce() argument
4076 ecmd->tx_coalesce_usecs = 0; in sky2_get_coalesce()
4079 ecmd->tx_coalesce_usecs = sky2_clk2us(hw, clks); in sky2_get_coalesce()
4081 ecmd->tx_max_coalesced_frames = sky2_read16(hw, STAT_TX_IDX_TH); in sky2_get_coalesce()
4084 ecmd->rx_coalesce_usecs = 0; in sky2_get_coalesce()
4087 ecmd->rx_coalesce_usecs = sky2_clk2us(hw, clks); in sky2_get_coalesce()
4089 ecmd->rx_max_coalesced_frames = sky2_read8(hw, STAT_FIFO_WM); in sky2_get_coalesce()
4092 ecmd->rx_coalesce_usecs_irq = 0; in sky2_get_coalesce()
4095 ecmd->rx_coalesce_usecs_irq = sky2_clk2us(hw, clks); in sky2_get_coalesce()
4098 ecmd->rx_max_coalesced_frames_irq = sky2_read8(hw, STAT_FIFO_ISR_WM); in sky2_get_coalesce()
4105 struct ethtool_coalesce *ecmd) in sky2_set_coalesce() argument
4111 if (ecmd->tx_coalesce_usecs > tmax || in sky2_set_coalesce()
4112 ecmd->rx_coalesce_usecs > tmax || in sky2_set_coalesce()
4113 ecmd->rx_coalesce_usecs_irq > tmax) in sky2_set_coalesce()
4116 if (ecmd->tx_max_coalesced_frames >= sky2->tx_ring_size-1) in sky2_set_coalesce()
4118 if (ecmd->rx_max_coalesced_frames > RX_MAX_PENDING) in sky2_set_coalesce()
4120 if (ecmd->rx_max_coalesced_frames_irq > RX_MAX_PENDING) in sky2_set_coalesce()
4123 if (ecmd->tx_coalesce_usecs == 0) in sky2_set_coalesce()
4127 sky2_us2clk(hw, ecmd->tx_coalesce_usecs)); in sky2_set_coalesce()
4130 sky2_write16(hw, STAT_TX_IDX_TH, ecmd->tx_max_coalesced_frames); in sky2_set_coalesce()
4132 if (ecmd->rx_coalesce_usecs == 0) in sky2_set_coalesce()
4136 sky2_us2clk(hw, ecmd->rx_coalesce_usecs)); in sky2_set_coalesce()
4139 sky2_write8(hw, STAT_FIFO_WM, ecmd->rx_max_coalesced_frames); in sky2_set_coalesce()
4141 if (ecmd->rx_coalesce_usecs_irq == 0) in sky2_set_coalesce()
4145 sky2_us2clk(hw, ecmd->rx_coalesce_usecs_irq)); in sky2_set_coalesce()
4148 sky2_write8(hw, STAT_FIFO_ISR_WM, ecmd->rx_max_coalesced_frames_irq); in sky2_set_coalesce()