]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: SQ: Adding synchronization between wa4074 and post_send
authorWei Lin Guay <wei.lin.guay@oracle.com>
Thu, 23 Jun 2016 19:11:42 +0000 (21:11 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:44:12 +0000 (16:44 +0200)
commitb25553e66a8f9bcc0bcd5026eff958cef5f57a86
treeb0816c7072b9ae75aeca92aa9eff78f21cc0f0fd
parentd55d9cfef3db2dfc20595872f54e633b8d818421
sif: SQ: Adding synchronization between wa4074 and post_send

Orabug: 23607042

In pre_process_wa4074, the SQ lock must be held before corrupting
the checksum in the SQ entry. Besides, use inverse the checksum
value rather than setting it to 0.

Another missing case of acquiring of SQ lock is before generating
the completion.  The SQ lock is only held to access the sq_sw->last_seq
to avoid generating completion before post send is completed. If this
case happen, it might cause the completion to be generated using the old
wc_id.

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