diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/falcon.c')
-rw-r--r-- | drivers/net/ethernet/sfc/falcon.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c index 71998e7995d9..6b6ac6d174aa 100644 --- a/drivers/net/ethernet/sfc/falcon.c +++ b/drivers/net/ethernet/sfc/falcon.c | |||
@@ -497,7 +497,7 @@ static void falcon_reset_macs(struct efx_nic *efx) | |||
497 | falcon_setup_xaui(efx); | 497 | falcon_setup_xaui(efx); |
498 | } | 498 | } |
499 | 499 | ||
500 | void falcon_drain_tx_fifo(struct efx_nic *efx) | 500 | static void falcon_drain_tx_fifo(struct efx_nic *efx) |
501 | { | 501 | { |
502 | efx_oword_t reg; | 502 | efx_oword_t reg; |
503 | 503 | ||
@@ -678,6 +678,28 @@ static int falcon_reconfigure_port(struct efx_nic *efx) | |||
678 | return 0; | 678 | return 0; |
679 | } | 679 | } |
680 | 680 | ||
681 | /* TX flow control may automatically turn itself off if the link | ||
682 | * partner (intermittently) stops responding to pause frames. There | ||
683 | * isn't any indication that this has happened, so the best we do is | ||
684 | * leave it up to the user to spot this and fix it by cycling transmit | ||
685 | * flow control on this end. | ||
686 | */ | ||
687 | |||
688 | static void falcon_a1_prepare_enable_fc_tx(struct efx_nic *efx) | ||
689 | { | ||
690 | /* Schedule a reset to recover */ | ||
691 | efx_schedule_reset(efx, RESET_TYPE_INVISIBLE); | ||
692 | } | ||
693 | |||
694 | static void falcon_b0_prepare_enable_fc_tx(struct efx_nic *efx) | ||
695 | { | ||
696 | /* Recover by resetting the EM block */ | ||
697 | falcon_stop_nic_stats(efx); | ||
698 | falcon_drain_tx_fifo(efx); | ||
699 | falcon_reconfigure_xmac(efx); | ||
700 | falcon_start_nic_stats(efx); | ||
701 | } | ||
702 | |||
681 | /************************************************************************** | 703 | /************************************************************************** |
682 | * | 704 | * |
683 | * PHY access via GMII | 705 | * PHY access via GMII |
@@ -1798,6 +1820,7 @@ const struct efx_nic_type falcon_a1_nic_type = { | |||
1798 | .set_id_led = falcon_set_id_led, | 1820 | .set_id_led = falcon_set_id_led, |
1799 | .push_irq_moderation = falcon_push_irq_moderation, | 1821 | .push_irq_moderation = falcon_push_irq_moderation, |
1800 | .reconfigure_port = falcon_reconfigure_port, | 1822 | .reconfigure_port = falcon_reconfigure_port, |
1823 | .prepare_enable_fc_tx = falcon_a1_prepare_enable_fc_tx, | ||
1801 | .reconfigure_mac = falcon_reconfigure_xmac, | 1824 | .reconfigure_mac = falcon_reconfigure_xmac, |
1802 | .check_mac_fault = falcon_xmac_check_fault, | 1825 | .check_mac_fault = falcon_xmac_check_fault, |
1803 | .get_wol = falcon_get_wol, | 1826 | .get_wol = falcon_get_wol, |
@@ -1842,6 +1865,7 @@ const struct efx_nic_type falcon_b0_nic_type = { | |||
1842 | .set_id_led = falcon_set_id_led, | 1865 | .set_id_led = falcon_set_id_led, |
1843 | .push_irq_moderation = falcon_push_irq_moderation, | 1866 | .push_irq_moderation = falcon_push_irq_moderation, |
1844 | .reconfigure_port = falcon_reconfigure_port, | 1867 | .reconfigure_port = falcon_reconfigure_port, |
1868 | .prepare_enable_fc_tx = falcon_b0_prepare_enable_fc_tx, | ||
1845 | .reconfigure_mac = falcon_reconfigure_xmac, | 1869 | .reconfigure_mac = falcon_reconfigure_xmac, |
1846 | .check_mac_fault = falcon_xmac_check_fault, | 1870 | .check_mac_fault = falcon_xmac_check_fault, |
1847 | .get_wol = falcon_get_wol, | 1871 | .get_wol = falcon_get_wol, |