diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-23 04:32:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-24 07:27:15 -0400 |
commit | 0d86ebd815416efb4e95ca70c3b8e65b476c5f9f (patch) | |
tree | d6ed53cfda8b1968119ea3ddf2a0b24e18211cfb /drivers/net/sfc/falcon.c | |
parent | 0484e0db7c4293d6202cff730ee359d8a7a6b085 (diff) |
sfc: Maintain interrupt moderation values in ticks, not microseconds
This simplifies the implementation a lot.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 1582df7aba7b..e3c33fa06c86 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -1063,20 +1063,11 @@ void falcon_set_int_moderation(struct efx_channel *channel) | |||
1063 | 1063 | ||
1064 | /* Set timer register */ | 1064 | /* Set timer register */ |
1065 | if (channel->irq_moderation) { | 1065 | if (channel->irq_moderation) { |
1066 | /* Round to resolution supported by hardware. The value we | ||
1067 | * program is based at 0. So actual interrupt moderation | ||
1068 | * achieved is ((x + 1) * res). | ||
1069 | */ | ||
1070 | channel->irq_moderation -= (channel->irq_moderation % | ||
1071 | FALCON_IRQ_MOD_RESOLUTION); | ||
1072 | if (channel->irq_moderation < FALCON_IRQ_MOD_RESOLUTION) | ||
1073 | channel->irq_moderation = FALCON_IRQ_MOD_RESOLUTION; | ||
1074 | EFX_POPULATE_DWORD_2(timer_cmd, | 1066 | EFX_POPULATE_DWORD_2(timer_cmd, |
1075 | FRF_AB_TC_TIMER_MODE, | 1067 | FRF_AB_TC_TIMER_MODE, |
1076 | FFE_BB_TIMER_MODE_INT_HLDOFF, | 1068 | FFE_BB_TIMER_MODE_INT_HLDOFF, |
1077 | FRF_AB_TC_TIMER_VAL, | 1069 | FRF_AB_TC_TIMER_VAL, |
1078 | channel->irq_moderation / | 1070 | channel->irq_moderation - 1); |
1079 | FALCON_IRQ_MOD_RESOLUTION - 1); | ||
1080 | } else { | 1071 | } else { |
1081 | EFX_POPULATE_DWORD_2(timer_cmd, | 1072 | EFX_POPULATE_DWORD_2(timer_cmd, |
1082 | FRF_AB_TC_TIMER_MODE, | 1073 | FRF_AB_TC_TIMER_MODE, |