]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: sqflush: Fix wrong casting in the calculation of CQ full
authorWei Lin Guay <wei.lin.guay@oracle.com>
Mon, 26 Sep 2016 14:09:27 +0000 (16:09 +0200)
committerKnut Omang <knut.omang@oracle.com>
Mon, 3 Oct 2016 12:02:26 +0000 (14:02 +0200)
commit34ee1621fe2897e3d0a9f77ad8a88bd6a3130829
tree95aa4ca4dcee13a0619baca6f03fe9a3a975c153
parente9633989350b798d2347827c0574b1594d50c54a
sif: sqflush: Fix wrong casting in the calculation of CQ full

Orabug: 24735772

The CQ full is calculated via last posted seq number (last_seq)
minus the last completion seq number (head_seq). Both last_seq
and head_seq are defined as u16. However, in the calculation to
verify that the CQ is not full, a wrong casting is performed.
This causes a false negative of CQ full in the wrapped case.

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_defs.h
drivers/infiniband/hw/sif/sif_r3.c