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)
commit2d533a9287f2011632977e87ce2783f4c689c984
tree4ae62c4cef5e199c64eb06c9eeac4076c16d9b30
parentf8c468e8537925e0c4607263f498a1b7c0c8982e
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