aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/infiniband/hermon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/infiniband/hermon.c')
-rw-r--r--src/drivers/infiniband/hermon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drivers/infiniband/hermon.c b/src/drivers/infiniband/hermon.c
index 2a9649d..50ba4f4 100644
--- a/src/drivers/infiniband/hermon.c
+++ b/src/drivers/infiniband/hermon.c
@@ -2130,6 +2130,8 @@ static void hermon_poll_eq ( struct ib_device *ibdev ) {
struct hermon_event_queue *hermon_eq = &hermon->eq;
union hermonprm_event_entry *eqe;
union hermonprm_doorbell_register db_reg;
+ unsigned long now;
+ unsigned long elapsed;
unsigned int eqe_idx_mask;
unsigned int event_type;
@@ -2138,7 +2140,12 @@ static void hermon_poll_eq ( struct ib_device *ibdev ) {
*/
if ( ib_is_open ( ibdev ) &&
( ibdev->port_state == IB_PORT_STATE_DOWN ) ) {
- ib_smc_update ( ibdev, hermon_mad );
+ now = currticks();
+ elapsed = ( now - hermon->last_poll );
+ if ( elapsed >= HERMON_LINK_POLL_INTERVAL ) {
+ hermon->last_poll = now;
+ ib_smc_update ( ibdev, hermon_mad );
+ }
}
/* Poll event queue */