IB/qib: Fix a possible data corruption when receiving packets
Prevent a receive data corruption by ensuring that the write to update the rcvhdrheadn register to generate an interrupt is at the very end of the receive processing. Signed-off-by: Ramkrishna Vepa <ram.vepa@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
@@ -4083,10 +4083,12 @@ static void qib_update_7322_usrhead(struct qib_ctxtdata *rcd, u64 hd,
|
||||
*/
|
||||
if (hd >> IBA7322_HDRHEAD_PKTINT_SHIFT)
|
||||
adjust_rcv_timeout(rcd, npkts);
|
||||
qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
|
||||
qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
|
||||
if (updegr)
|
||||
qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt);
|
||||
mmiowb();
|
||||
qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
|
||||
qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
|
||||
mmiowb();
|
||||
}
|
||||
|
||||
static u32 qib_7322_hdrqempty(struct qib_ctxtdata *rcd)
|
||||
|
Reference in New Issue
Block a user