Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7ed3a59 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier
Browse files

[IB] mthca: fix off by one in clr_int calculation



We should use the first word of the clear interrupt register if
the bit we're after is < 32, not < 31.

Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 018771f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;