diff options
Diffstat (limited to 'drivers/net/sfc/tenxpress.c')
-rw-r--r-- | drivers/net/sfc/tenxpress.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index 19c78d281700..6a8e3ea03811 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -613,21 +613,29 @@ static void tenxpress_phy_fini(struct efx_nic *efx) | |||
613 | } | 613 | } |
614 | 614 | ||
615 | 615 | ||
616 | /* Set the RX and TX LEDs and Link LED flashing. The other LEDs | 616 | /* Override the RX, TX and link LEDs */ |
617 | * (which probably aren't wired anyway) are left in AUTO mode */ | 617 | void tenxpress_set_id_led(struct efx_nic *efx, enum efx_led_mode mode) |
618 | void tenxpress_phy_blink(struct efx_nic *efx, bool blink) | ||
619 | { | 618 | { |
620 | int reg; | 619 | int reg; |
621 | 620 | ||
622 | if (blink) | 621 | switch (mode) { |
623 | reg = (PMA_PMD_LED_FLASH << PMA_PMD_LED_TX_LBN) | | 622 | case EFX_LED_OFF: |
624 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_RX_LBN) | | 623 | reg = (PMA_PMD_LED_OFF << PMA_PMD_LED_TX_LBN) | |
625 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_LINK_LBN); | 624 | (PMA_PMD_LED_OFF << PMA_PMD_LED_RX_LBN) | |
626 | else | 625 | (PMA_PMD_LED_OFF << PMA_PMD_LED_LINK_LBN); |
626 | break; | ||
627 | case EFX_LED_ON: | ||
628 | reg = (PMA_PMD_LED_ON << PMA_PMD_LED_TX_LBN) | | ||
629 | (PMA_PMD_LED_ON << PMA_PMD_LED_RX_LBN) | | ||
630 | (PMA_PMD_LED_ON << PMA_PMD_LED_LINK_LBN); | ||
631 | break; | ||
632 | default: | ||
627 | if (efx->phy_type == PHY_TYPE_SFX7101) | 633 | if (efx->phy_type == PHY_TYPE_SFX7101) |
628 | reg = SFX7101_PMA_PMD_LED_DEFAULT; | 634 | reg = SFX7101_PMA_PMD_LED_DEFAULT; |
629 | else | 635 | else |
630 | reg = SFT9001_PMA_PMD_LED_DEFAULT; | 636 | reg = SFT9001_PMA_PMD_LED_DEFAULT; |
637 | break; | ||
638 | } | ||
631 | 639 | ||
632 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, reg); | 640 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, reg); |
633 | } | 641 | } |