Skip to content

Commit

Permalink
[IB] mthca: fix off by one in clr_int calculation
Browse files Browse the repository at this point in the history
We should use the first word of the clear interrupt register if
the bit we're after is < 32, not < 31.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Sep 26, 2005
1 parent 018771f commit f7ed3a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mthca/mthca_eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev)
dev->eq_table.clr_mask =
swab32(1 << (dev->eq_table.inta_pin & 31));
dev->eq_table.clr_int = dev->clr_base +
(dev->eq_table.inta_pin < 31 ? 4 : 0);
(dev->eq_table.inta_pin < 32 ? 4 : 0);
}

dev->eq_table.arm_mask = 0;
Expand Down

0 comments on commit f7ed3a5

Please sign in to comment.