netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sathya Perla <sathya.perla@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH net-next 7/8] be2net: send a max of 8 EQs to be_cmd_modify_eqd() on Lancer
Date: Fri, 12 Sep 2014 17:39:20 +0530	[thread overview]
Message-ID: <1410523761-1744-8-git-send-email-sathya.perla@emulex.com> (raw)
In-Reply-To: <1410523761-1744-1-git-send-email-sathya.perla@emulex.com>

From: Kalesh AP <kalesh.purayil@emulex.com>

The MODIFY_EQ_DELAY FW cmd on Lancer is supported for a max of 8 EQs per cmd.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_cmds.c |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 85edde6..cd213d9 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1783,8 +1783,8 @@ err:
 /* set the EQ delay interval of an EQ to specified value
  * Uses async mcc
  */
-int be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
-		      int num)
+int __be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
+			int num)
 {
 	struct be_mcc_wrb *wrb;
 	struct be_cmd_req_modify_eq_delay *req;
@@ -1817,6 +1817,25 @@ err:
 	return status;
 }
 
+int be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
+		      int num)
+{
+	int num_eqs, i = 0;
+
+	if (lancer_chip(adapter) && num > 8) {
+		while (num) {
+			num_eqs = min(num, 8);
+			__be_cmd_modify_eqd(adapter, &set_eqd[i], num_eqs);
+			i += num_eqs;
+			num -= num_eqs;
+		}
+	} else {
+		__be_cmd_modify_eqd(adapter, set_eqd, num);
+	}
+
+	return 0;
+}
+
 /* Uses sycnhronous mcc */
 int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id, u16 *vtag_array,
 		       u32 num)
-- 
1.7.1

  parent reply	other threads:[~2014-09-12 12:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 12:09 [PATCH net-next 0/8] be2net: patch set Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 1/8] be2net: fix some log messages Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 2/8] be2net: replace strcpy with strlcpy Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 3/8] be2net: fix RX fragment posting for jumbo frames Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 4/8] be2net: use v1 of SET_FLOW_CONTROL command Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 5/8] be2net: add ethtool "-m" option support Sathya Perla
2014-09-12 12:09 ` [PATCH net-next 6/8] be2net: fix port-type reporting in get_settings Sathya Perla
2014-09-12 12:09 ` Sathya Perla [this message]
2014-09-12 12:09 ` [PATCH net-next 8/8] be2net: enable PCIe error reporting on VFs too Sathya Perla
2014-09-13 21:12 ` [PATCH net-next 0/8] be2net: patch set 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=1410523761-1744-8-git-send-email-sathya.perla@emulex.com \
    --to=sathya.perla@emulex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).