From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>,
Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net-next 4/5] qed: add support for link pause configuration.
Date: Sun, 17 Apr 2016 22:26:34 +0300 [thread overview]
Message-ID: <1460921195-23352-5-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1460921195-23352-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
The APIs for making this sort of configuration [e.g., via ethtool] are
already present in qede, but the current configuration flow in qed doesn't
respect it.
Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index d189871..1918b83 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -962,6 +962,20 @@ static int qed_set_link(struct qed_dev *cdev,
}
if (params->override_flags & QED_LINK_OVERRIDE_SPEED_FORCED_SPEED)
link_params->speed.forced_speed = params->forced_speed;
+ if (params->override_flags & QED_LINK_OVERRIDE_PAUSE_CONFIG) {
+ if (params->pause_config & QED_LINK_PAUSE_AUTONEG_ENABLE)
+ link_params->pause.autoneg = true;
+ else
+ link_params->pause.autoneg = false;
+ if (params->pause_config & QED_LINK_PAUSE_RX_ENABLE)
+ link_params->pause.forced_rx = true;
+ else
+ link_params->pause.forced_rx = false;
+ if (params->pause_config & QED_LINK_PAUSE_TX_ENABLE)
+ link_params->pause.forced_tx = true;
+ else
+ link_params->pause.forced_tx = false;
+ }
rc = qed_mcp_set_link(hwfn, ptt, params->link_up);
--
1.9.3
next prev parent reply other threads:[~2016-04-17 19:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-17 19:26 [PATCH net-next 0/5] qed*: eeprom access et al Yuval Mintz
2016-04-17 19:26 ` [PATCH net-next 1/5] qed*: Align statistics names Yuval Mintz
2016-04-17 19:26 ` [PATCH net-next 2/5] qede: Add support for ethtool private flags Yuval Mintz
2016-04-18 14:11 ` Sergei Shtylyov
2016-04-18 14:34 ` Yuval Mintz
2016-04-17 19:26 ` [PATCH net-next 3/5] qed*: Conditions for changing link Yuval Mintz
2016-04-17 19:26 ` Yuval Mintz [this message]
2016-04-17 19:26 ` [PATCH net-next 5/5] qed*: Add support for read/write of eeprom Yuval Mintz
2016-04-17 23:18 ` David Miller
2016-04-18 3:59 ` Yuval Mintz
2016-04-18 4:07 ` David Miller
2016-04-18 5:50 ` Yuval Mintz
2016-04-20 5:25 ` Yuval Mintz
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=1460921195-23352-5-git-send-email-Yuval.Mintz@qlogic.com \
--to=yuval.mintz@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sudarsana.kalluru@qlogic.com \
/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).