Skip to content

Commit 2f01a70

Browse files
Arthur JonesRoland Dreier
authored andcommitted
IB/ipath: Better comment for rmb() in ipath_intr()
An internal code review found the comment here lacking -- update it with more specifics of how and why the rmb() is there. Signed-off-by: Arthur Jones <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent 6276980 commit 2f01a70

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/infiniband/hw/ipath/ipath_intr.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,15 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat)
954954
int i;
955955
int rcvdint = 0;
956956

957-
/* test_bit below needs this... */
957+
/*
958+
* test_and_clear_bit(IPATH_PORT_WAITING_RCV) and
959+
* test_and_clear_bit(IPATH_PORT_WAITING_URG) below
960+
* would both like timely updates of the bits so that
961+
* we don't pass them by unnecessarily. the rmb()
962+
* here ensures that we see them promptly -- the
963+
* corresponding wmb()'s are in ipath_poll_urgent()
964+
* and ipath_poll_next()...
965+
*/
958966
rmb();
959967
portr = ((istat >> INFINIPATH_I_RCVAVAIL_SHIFT) &
960968
dd->ipath_i_rcvavail_mask)

0 commit comments

Comments
 (0)