]> git.baikalelectronics.ru Git - kernel.git/commit
qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count
authorDenis Bolotin <dbolotin@marvell.com>
Thu, 3 Jan 2019 10:02:39 +0000 (12:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2019 20:57:30 +0000 (12:57 -0800)
commit5be3f99d678cb7422ec90904781909be0d8cc29a
tree4ae62c4cef5e199c64eb06c9eeac4076c16d9b30
parent0510d2bb456ccc0c807d586bb36f9b24902788df
qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count

In PBL chains with non power of 2 page count, the producer is not at the
beginning of the chain when index is 0 after a wrap. Therefore, after the
producer index wrap around, page index should be calculated more carefully.

Signed-off-by: Denis Bolotin <dbolotin@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/qed/qed_chain.h