summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/siena.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/siena.c
parent539de7c5240a257c9028b3063873170a6867b159 (diff)
downloadlinux-d95e329a55baaea8c00d1b3e0ce22c974d447524.tar.bz2
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/siena.c')
-rw-r--r--drivers/net/ethernet/sfc/siena.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 994e33f93caf..04ed1b4c7cd9 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -227,6 +227,9 @@ static int siena_probe_nvconfig(struct efx_nic *efx)
efx->timer_quantum_ns =
(caps & (1 << MC_CMD_CAPABILITIES_TURBO_ACTIVE_LBN)) ?
3072 : 6144; /* 768 cycles */
+ efx->timer_max_ns = efx->type->timer_period_max *
+ efx->timer_quantum_ns;
+
return rc;
}