DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, qi.z.zhang@intel.com, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553
Date: Fri, 29 Mar 2019 15:22:03 +0800	[thread overview]
Message-ID: <1553844123-51934-1-git-send-email-wei.zhao1@intel.com> (raw)

There is need to eanble 10Mb/s link foixgbe NIC of x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..0b78647 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,9 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T) ||
+			(hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L))
+			allowed_speeds |= ETH_LINK_SPEED_10M;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2708,6 +2711,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 	}
 
 	link_speeds = &dev->data->dev_conf.link_speeds;
+	*link_speeds = ETH_LINK_SPEED_10M;
 	if (*link_speeds & ~allowed_speeds) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if ((hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T) ||
+			(hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L))
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1

             reply	other threads:[~2019-03-29  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  7:22 Wei Zhao [this message]
2019-03-29  7:22 ` Wei Zhao
2019-03-29  7:31 Wei Zhao
2019-03-29  7:31 ` Wei Zhao

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=1553844123-51934-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --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).