From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Subject: [dpdk-dev] [PATCH v3 06/16] net/bnxt: fix 40G link failure for Thor
Date: Wed, 2 Oct 2019 10:17:35 -0700 [thread overview]
Message-ID: <20191002171745.4504-7-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191002171745.4504-1-ajit.khaparde@broadcom.com>
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Link autonegotiation for 40G is not supported by Thor.
Hence speed needs to be forced and autoneg disabled to configure 40G speed.
Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b2033ea416..6e95acb89e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2679,11 +2679,27 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
goto port_phy_cfg;
autoneg = bnxt_check_eth_link_autoneg(dev_conf->link_speeds);
+ if (BNXT_CHIP_THOR(bp) &&
+ dev_conf->link_speeds == ETH_LINK_SPEED_40G) {
+ /* 40G is not supported as part of media auto detect.
+ * The speed should be forced and autoneg disabled
+ * to configure 40G speed.
+ */
+ PMD_DRV_LOG(INFO, "Disabling autoneg for 40G\n");
+ autoneg = 0;
+ }
+
speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds);
link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
- /* Autoneg can be done only when the FW allows */
- if (autoneg == 1 && !(bp->link_info.auto_link_speed ||
- bp->link_info.force_link_speed)) {
+ /* Autoneg can be done only when the FW allows.
+ * When user configures fixed speed of 40G and later changes to
+ * any other speed, auto_link_speed/force_link_speed is still set
+ * to 40G until link comes up at new speed.
+ */
+ if (autoneg == 1 &&
+ !(!BNXT_CHIP_THOR(bp) &&
+ (bp->link_info.auto_link_speed ||
+ bp->link_info.force_link_speed))) {
link_req.phy_flags |=
HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG;
link_req.auto_link_speed_mask =
--
2.20.1 (Apple Git-117)
next prev parent reply other threads:[~2019-10-02 17:18 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 5:54 [dpdk-dev] [PATCH v2 00/17] bnxt patchset Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 01/17] net/bnxt: fix incorrect flow steering Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 02/17] net/bnxt: fix traffic failure with higher mbuf size Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 03/17] net/bnxt: fix rxq stop/start handling Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 04/17] net/bnxt: subscribe to link speed change notification Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 05/17] net/bnxt: fix async link handling and update Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 06/17] net/bnxt: fix 40G link failure for Thor Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 07/17] net/bnxt: fix L2 context calculation " Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 08/17] net/bnxt: fix use of deferred start of transmit queues Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 09/17] net/bnxt: remove unnecessary return check Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 10/17] net/bnxt: remove unused macro Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 11/17] net/bnxt: remove unnecessary interrupt disable Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 12/17] net/bnxt: fix accessing variable before null check Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 13/17] net/bnxt: fix Rx queue count devop Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 14/17] net/bnxt: fix mbuf flags for PTP packets in vector mode Rx Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 15/17] net/bnxt: fix a segfault in secondary process Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 16/17] net/bnxt: support for QinQ insertion and stripping Ajit Khaparde
2019-10-02 5:54 ` [dpdk-dev] [PATCH v2 17/17] net/bnxt: use macro for getting default vnic Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 00/16] bnxt patchset Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 01/16] net/bnxt: fix incorrect flow steering Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 02/16] net/bnxt: fix traffic failure with higher mbuf size Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 03/16] net/bnxt: fix rxq stop/start handling Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 04/16] net/bnxt: subscribe to link speed change notification Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 05/16] net/bnxt: fix async link handling and update Ajit Khaparde
2019-10-02 17:17 ` Ajit Khaparde [this message]
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 07/16] net/bnxt: fix L2 context calculation for Thor Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 08/16] net/bnxt: fix use of deferred start of transmit queues Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 09/16] net/bnxt: remove unnecessary return check Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 10/16] net/bnxt: remove unused macro Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 11/16] net/bnxt: remove unnecessary interrupt disable Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 12/16] net/bnxt: fix accessing variable before null check Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 13/16] net/bnxt: fix Rx queue count devop Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 14/16] net/bnxt: fix a segfault in secondary process Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 15/16] net/bnxt: support for QinQ insertion and stripping Ajit Khaparde
2019-10-02 17:17 ` [dpdk-dev] [PATCH v3 16/16] net/bnxt: use macro for getting default vnic Ajit Khaparde
2019-10-02 18:35 ` [dpdk-dev] [PATCH v3 00/16] bnxt patchset Ferruh Yigit
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=20191002171745.4504-7-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=santosh.rastapur@broadcom.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).