[v1,29/38] net/mvpp2: autoneg disable handling
diff mbox series

Message ID 20201202101212.4717-30-lironh@marvell.com
State Changes Requested
Delegated to: Jerin Jacob
Headers show
Series
  • net/mvpp2: misc updates
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Liron Himi Dec. 2, 2020, 10:12 a.m. UTC
From: Yuri Chipchev <yuric@marvell.com>

flow control autoneg disable is not supported

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Michael Shamis Dec. 23, 2020, 9:31 a.m. UTC | #1
Reviewed-by: Michael Shamis <michaelsh@marvell.com>

-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of lironh@marvell.com
Sent: Wednesday, December 2, 2020 12:12 PM
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Cc: dev@dpdk.org; Yuri Chipchev <yuric@marvell.com>; Liron Himi <lironh@marvell.com>
Subject: [dpdk-dev] [PATCH v1 29/38] net/mvpp2: autoneg disable handling

From: Yuri Chipchev <yuric@marvell.com>

flow control autoneg disable is not supported

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 66c3c8e57..535d7cc60 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2135,6 +2135,7 @@ mrvl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	if (!priv)
 		return -EPERM;
 
+	fc_conf->autoneg = 1;
 	ret = pp2_ppio_get_rx_pause(priv->ppio, &en);
 	if (ret) {
 		MRVL_LOG(ERR, "Failed to read rx pause state"); @@ -2184,13 +2185,17 @@ mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	if (fc_conf->high_water ||
 	    fc_conf->low_water ||
 	    fc_conf->pause_time ||
-	    fc_conf->mac_ctrl_frame_fwd ||
-	    fc_conf->autoneg) {
+	    fc_conf->mac_ctrl_frame_fwd) {
 		MRVL_LOG(ERR, "Flowctrl parameter is not supported");
 
 		return -EINVAL;
 	}
 
+	if (fc_conf->autoneg == 0) {
+		MRVL_LOG(ERR, "Flowctrl Autoneg disable is not supported");
+		return -EINVAL;
+	}
+
 	switch (fc_conf->mode) {
 	case RTE_FC_FULL:
 		rx_en = 1;
--
2.28.0

Patch
diff mbox series

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 66c3c8e57..535d7cc60 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2135,6 +2135,7 @@  mrvl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	if (!priv)
 		return -EPERM;
 
+	fc_conf->autoneg = 1;
 	ret = pp2_ppio_get_rx_pause(priv->ppio, &en);
 	if (ret) {
 		MRVL_LOG(ERR, "Failed to read rx pause state");
@@ -2184,13 +2185,17 @@  mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	if (fc_conf->high_water ||
 	    fc_conf->low_water ||
 	    fc_conf->pause_time ||
-	    fc_conf->mac_ctrl_frame_fwd ||
-	    fc_conf->autoneg) {
+	    fc_conf->mac_ctrl_frame_fwd) {
 		MRVL_LOG(ERR, "Flowctrl parameter is not supported");
 
 		return -EINVAL;
 	}
 
+	if (fc_conf->autoneg == 0) {
+		MRVL_LOG(ERR, "Flowctrl Autoneg disable is not supported");
+		return -EINVAL;
+	}
+
 	switch (fc_conf->mode) {
 	case RTE_FC_FULL:
 		rx_en = 1;