]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:09:44 +0000 (10:09 +0100)
commit92acaa684e073ded15e15aea19b0cbc3eaec5492
tree1e0be21d987bed3091937da9f7e8f561a478c564
parent0962699ef1b00db360529776c9258ef22749e3bb
qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count

[ Upstream commit 2d533a9287f2011632977e87ce2783f4c689c984 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/qed/qed_chain.h