From: Lunyuan Cui <lunyuanx.cui@intel.com>
To: dev@dpdk.org
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>,
Qiming Yang <qiming.yang@intel.com>,
Lunyuan Cui <lunyuanx.cui@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix ixgbevf link status
Date: Tue, 17 Dec 2019 06:12:03 +0000 [thread overview]
Message-ID: <20191217061203.47833-1-lunyuanx.cui@intel.com> (raw)
The link status for ixgbevf is not correct when PF link up.
IXGBE_ESDP register is only used when media type is fiber.
Fixes: 1ca05831b9be ("net/ixgbe: fix link status")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c6fd0f13..a3f550c53 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4155,9 +4155,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
return rte_eth_linkstatus_set(dev, &link);
}
- esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
- if ((esdp_reg & IXGBE_ESDP_SDP3))
- link_up = 0;
+ if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+ esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
+ if ((esdp_reg & IXGBE_ESDP_SDP3))
+ link_up = 0;
+ }
if (link_up == 0) {
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
--
2.17.1
next reply other threads:[~2019-12-17 6:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 6:12 Lunyuan Cui [this message]
2019-12-18 2:35 ` Ye Xiaolong
-- strict thread matches above, loose matches on Subject: below --
2018-08-10 8:10 Yanglong Wu
2018-09-06 5:33 ` Zhang, Qi Z
2018-10-26 6:10 ` Wu, Yanglong
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=20191217061203.47833-1-lunyuanx.cui@intel.com \
--to=lunyuanx.cui@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@intel.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).