diff options
author | Bert Kenward <bkenward@solarflare.com> | 2016-08-11 14:02:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 05:42:20 +0200 |
commit | d95e329a55baaea8c00d1b3e0ce22c974d447524 (patch) | |
tree | f95631818601476a296eeee1fb6c0bf81e70505f /drivers/net/ethernet/sfc/siena.c | |
parent | sfc: set interrupt moderation via MCDI (diff) | |
download | linux-d95e329a55baaea8c00d1b3e0ce22c974d447524.tar.xz linux-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/siena.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena.c | 3 |
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; } |