qed: Align CIDs according to DORQ requirement
authorRam Amrani <Ram.Amrani@cavium.com>
Tue, 14 Mar 2017 13:25:58 +0000 (15:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:21 +0000 (10:07 +0100)
commit8de6d7b28d2f135838275258b715a52db27fdb1c
tree03d46875fdedfc0a2573968e5f0bb350c73b9df8
parentfddc3df7647e796c8947215a281db95109d17ac1
qed: Align CIDs according to DORQ requirement

[ Upstream commit f3e48119b97f56fb09310c95d49da122a27003d7 ]

The Doorbell HW block can be configured at a granularity
of 16 x CIDs, so we need to make sure that the actual number
of CIDs configured would be a multiplication of 16.

Today, when RoCE is enabled - given that the number is unaligned,
doorbelling the higher CIDs would fail to reach the firmware and
would eventually timeout.

Fixes: dbb799c39717 ("qed: Initialize hardware for new protocols")
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qed/qed_cxt.c