]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit37e34c3bcc8e662e6a548cf9bf63b2ec35833b14
treecf998c2394d8b12a861744421674726633f74185
parent3fb0b9c4ba3063da23b4334de22ac605e6548245
qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count

BugLink: https://bugs.launchpad.net/bugs/1837813
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/qed/qed_chain.h