]> www.infradead.org Git - users/jedix/linux-maple.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:08:03 +0000 (10:08 +0100)
commita096429cac56f3d4571ae7914f98bd2eb201b5fe
tree9c1a2e93b3679e5c845eceb6e27087c3d2b50383
parent3abbc145c7f7dd6f2ba3e89a8e2e691fb16e1f85
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