patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 1/9] net/ngbe: fix to set force speed
Date: Mon, 30 May 2022 17:30:08 +0800	[thread overview]
Message-ID: <20220530093016.16326-2-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20220530093016.16326-1-jiawenwu@trustnetic.com>

Since the bit of ETH_LINK_SPEED_FIXED was set for the force link
speed, it conflicts with '~allowed_speeds'.

Fixes: 3518df5774c7 ("net/ngbe: support device start/stop")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 4a2a9dde10..c7301a9616 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1048,7 +1048,7 @@ ngbe_dev_start(struct rte_eth_dev *dev)
 	if (hw->mac.default_speeds & NGBE_LINK_SPEED_10M_FULL)
 		allowed_speeds |= RTE_ETH_LINK_SPEED_10M;
 
-	if (*link_speeds & ~allowed_speeds) {
+	if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
 	}
-- 
2.27.0




       reply	other threads:[~2022-05-30  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220530093016.16326-1-jiawenwu@trustnetic.com>
2022-05-30  9:30 ` Jiawen Wu [this message]
2022-05-30  9:30 ` [PATCH 3/9] net/ngbe: fix occasional failure of reading PHY ID Jiawen Wu
2022-05-30  9:30 ` [PATCH 4/9] net/ngbe: fix external PHY to power down Jiawen Wu
2022-05-30  9:30 ` [PATCH 5/9] net/ngbe: fix to read M88E1512 PHY mode Jiawen Wu
2022-05-30  9:30 ` [PATCH 6/9] net/ngbe: change PCIe related operations to use rte API Jiawen Wu
2022-05-30  9:30 ` [PATCH 7/9] net/ngbe: redesign internal PHY init flow Jiawen Wu
2022-05-30  9:30 ` [PATCH 8/9] net/txgbe: fix SGMII mode to link up Jiawen Wu
2022-05-30  9:30 ` [PATCH 9/9] net/txgbe: fix max number of queues for SRIOV Jiawen Wu

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=20220530093016.16326-2-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.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).