All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <netdev@vger.kernel.org>
Cc: Ram Amrani <Ram.Amrani@cavium.com>, Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH net 1/7] qed: Align CIDs according to DORQ requirement
Date: Tue, 14 Mar 2017 15:25:58 +0200	[thread overview]
Message-ID: <1489497964-13734-2-git-send-email-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <1489497964-13734-1-git-send-email-Yuval.Mintz@cavium.com>

From: Ram Amrani <Ram.Amrani@cavium.com>

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>
---
 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index d42d03d..7e3a6fe 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -422,8 +422,9 @@ static void qed_cxt_set_proto_cid_count(struct qed_hwfn *p_hwfn,
 		u32 page_sz = p_mgr->clients[ILT_CLI_CDUC].p_size.val;
 		u32 cxt_size = CONN_CXT_SIZE(p_hwfn);
 		u32 elems_per_page = ILT_PAGE_IN_BYTES(page_sz) / cxt_size;
+		u32 align = elems_per_page * DQ_RANGE_ALIGN;
 
-		p_conn->cid_count = roundup(p_conn->cid_count, elems_per_page);
+		p_conn->cid_count = roundup(p_conn->cid_count, align);
 	}
 }
 
-- 
1.9.3

  reply	other threads:[~2017-03-14 13:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 13:25 [PATCH net 0/7] qed: Fixes series Yuval Mintz
2017-03-14 13:25 ` Yuval Mintz [this message]
2017-03-14 13:25 ` [PATCH net 2/7] qed: Prevent creation of too-big u32-chains Yuval Mintz
2017-03-14 13:26 ` [PATCH net 3/7] qed: Fix mapping leak on LL2 rx flow Yuval Mintz
2017-03-14 13:26 ` [PATCH net 4/7] qed: Free previous connections when releasing iSCSI Yuval Mintz
2017-03-14 13:26 ` [PATCH net 5/7] qed: Fix interrupt flags on Rx LL2 Yuval Mintz
2017-03-14 13:26 ` [PATCH net 6/7] qed: Correct out-of-bound access in OOO history Yuval Mintz
2017-03-14 13:26 ` [PATCH net 7/7] qed: Enable iSCSI Out-of-Order Yuval Mintz
2017-03-14 13:29 ` FW: [PATCH net 0/7] qed: Fixes series Mintz, Yuval
2017-03-14 18:38 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489497964-13734-2-git-send-email-Yuval.Mintz@cavium.com \
    --to=yuval.mintz@cavium.com \
    --cc=Ram.Amrani@cavium.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.