summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/falcon.c
diff options
context:
space:
mode:
authorBert Kenward <bkenward@solarflare.com>2016-08-11 13:02:36 +0100
committerDavid S. Miller <davem@davemloft.net>2016-08-12 20:42:20 -0700
commitd95e329a55baaea8c00d1b3e0ce22c974d447524 (patch)
treef95631818601476a296eeee1fb6c0bf81e70505f /drivers/net/ethernet/sfc/falcon.c
parent539de7c5240a257c9028b3063873170a6867b159 (diff)
downloadlwn-d95e329a55baaea8c00d1b3e0ce22c974d447524.tar.gz
lwn-d95e329a55baaea8c00d1b3e0ce22c974d447524.zip
sfc: get timer configuration from adapter
On SFN8000 series adapters the MC provides a method to get the timer quantum and the maximum timer setting. We revert to the old values if the new call is unavailable. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/falcon.c')
-rw-r--r--drivers/net/ethernet/sfc/falcon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c
index d3d0bccaccaa..1a7092602aec 100644
--- a/drivers/net/ethernet/sfc/falcon.c
+++ b/drivers/net/ethernet/sfc/falcon.c
@@ -2376,6 +2376,8 @@ static int falcon_probe_nic(struct efx_nic *efx)
EFX_MAX_CHANNELS);
efx->max_tx_channels = efx->max_channels;
efx->timer_quantum_ns = 4968; /* 621 cycles */
+ efx->timer_max_ns = efx->type->timer_period_max *
+ efx->timer_quantum_ns;
/* Initialise I2C adapter */
board = falcon_board(efx);