From: John Lacombe Date: Fri, 26 Sep 2008 20:08:10 +0000 (-0500) Subject: RDMA/nes: Use ethtool timer value X-Git-Tag: v2.6.28-rc1~727^2^10~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=27ffed603f555ce0a644de6e550d3462ff51d64f;p=linux-2.6-omap-h63xx.git RDMA/nes: Use ethtool timer value Use timer value set via ethtool intead of #defines. Signed-off-by: John Lacombe Signed-off-by: Sweta Bhatt Signed-off-by: Chien Tung Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index bc16fc082d9..515c0716345 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -222,11 +222,10 @@ static void nes_nic_tune_timer(struct nes_device *nesdev) } /* boundary checking */ - if (shared_timer->timer_in_use > NES_NIC_FAST_TIMER_HIGH) - shared_timer->timer_in_use = NES_NIC_FAST_TIMER_HIGH; - else if (shared_timer->timer_in_use < NES_NIC_FAST_TIMER_LOW) { - shared_timer->timer_in_use = NES_NIC_FAST_TIMER_LOW; - } + if (shared_timer->timer_in_use > shared_timer->threshold_high) + shared_timer->timer_in_use = shared_timer->threshold_high; + else if (shared_timer->timer_in_use < shared_timer->threshold_low) + shared_timer->timer_in_use = shared_timer->threshold_low; nesdev->currcq_count = 0;