DPDK patches and discussions
 help / color / mirror / Atom feed
From: <ssebasti@amd.com>
To: <dev@dpdk.org>
Subject: [PATCH v2 5/6] net/axgbe: add support for new port mode
Date: Tue, 25 Jan 2022 17:47:46 +0530	[thread overview]
Message-ID: <20220125121747.344631-6-ssebasti@amd.com> (raw)
In-Reply-To: <20220125121747.344631-1-ssebasti@amd.com>

From: Selwin Sebastian <selwin.sebastian@amd.com>

Add support for a new port mode that is a backplane
connection without support for auto negotiation.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index eefb03e94e..b0e1c267b1 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -46,6 +46,7 @@ enum axgbe_port_mode {
 	AXGBE_PORT_MODE_10GBASE_T,
 	AXGBE_PORT_MODE_10GBASE_R,
 	AXGBE_PORT_MODE_SFP,
+	AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG,
 	AXGBE_PORT_MODE_MAX,
 };
 
@@ -885,6 +886,7 @@ static enum axgbe_mode axgbe_phy_an73_redrv_outcome(struct axgbe_port *pdata)
 	if (ad_reg & 0x80) {
 		switch (phy_data->port_mode) {
 		case AXGBE_PORT_MODE_BACKPLANE:
+		case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 			mode = AXGBE_MODE_KR;
 			break;
 		default:
@@ -894,6 +896,7 @@ static enum axgbe_mode axgbe_phy_an73_redrv_outcome(struct axgbe_port *pdata)
 	} else if (ad_reg & 0x20) {
 		switch (phy_data->port_mode) {
 		case AXGBE_PORT_MODE_BACKPLANE:
+		case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 			mode = AXGBE_MODE_KX_1000;
 			break;
 		case AXGBE_PORT_MODE_1000BASE_X:
@@ -1052,6 +1055,7 @@ static unsigned int axgbe_phy_an_advertising(struct axgbe_port *pdata)
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		advertising |= ADVERTISED_10000baseKR_Full;
 		break;
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
@@ -1122,6 +1126,7 @@ static enum axgbe_an_mode axgbe_phy_an_mode(struct axgbe_port *pdata)
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
 		return AXGBE_AN_MODE_CL73;
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
 		return AXGBE_AN_MODE_NONE;
 	case AXGBE_PORT_MODE_1000BASE_T:
@@ -1400,6 +1405,7 @@ static enum axgbe_mode axgbe_phy_switch_mode(struct axgbe_port *pdata)
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		return axgbe_phy_switch_bp_mode(pdata);
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
 		return axgbe_phy_switch_bp_2500_mode(pdata);
@@ -1495,6 +1501,7 @@ static enum axgbe_mode axgbe_phy_get_mode(struct axgbe_port *pdata,
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		return axgbe_phy_get_bp_mode(speed);
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
 		return axgbe_phy_get_bp_2500_mode(speed);
@@ -1644,6 +1651,7 @@ static bool axgbe_phy_use_mode(struct axgbe_port *pdata, enum axgbe_mode mode)
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		return axgbe_phy_use_bp_mode(pdata, mode);
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
 		return axgbe_phy_use_bp_2500_mode(pdata, mode);
@@ -1806,6 +1814,7 @@ static bool axgbe_phy_port_mode_mismatch(struct axgbe_port *pdata)
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		if ((phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_1000) ||
 		    (phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_10000))
 			return false;
@@ -1858,6 +1867,7 @@ static bool axgbe_phy_conn_type_mismatch(struct axgbe_port *pdata)
 
 	switch (phy_data->port_mode) {
 	case AXGBE_PORT_MODE_BACKPLANE:
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 	case AXGBE_PORT_MODE_BACKPLANE_2500:
 		if (phy_data->conn_type == AXGBE_CONN_TYPE_BACKPLANE)
 			return false;
@@ -2122,6 +2132,8 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
 		/* Backplane support */
 	case AXGBE_PORT_MODE_BACKPLANE:
 		pdata->phy.supported |= SUPPORTED_Autoneg;
+		/* Fallthrough */
+	case AXGBE_PORT_MODE_BACKPLANE_NO_AUTONEG:
 		pdata->phy.supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
 		pdata->phy.supported |= SUPPORTED_Backplane;
 		if (phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_1000) {
-- 
2.25.1


  parent reply	other threads:[~2022-01-25 12:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 12:17 [PATCH v2 0/6] axgbe pmd updates ssebasti
2022-01-25 12:17 ` [PATCH v2 1/6] net/axgbe: always attempt link training in KR mode ssebasti
2022-01-27 13:45   ` Namburu, Chandu-babu
2022-01-25 12:17 ` [PATCH v2 2/6] net/axgbe: toggle PLL settings during rate change ssebasti
2022-01-27 13:39   ` Namburu, Chandu-babu
2022-01-25 12:17 ` [PATCH v2 3/6] net/axgbe: simplify mailbox interface rate change code ssebasti
2022-01-27 13:39   ` Namburu, Chandu-babu
2022-01-25 12:17 ` [PATCH v2 4/6] net/axgbe: reset PHY Rx when mailbox command timeout ssebasti
2022-01-27 13:39   ` Namburu, Chandu-babu
2022-01-25 12:17 ` ssebasti [this message]
2022-01-27 13:39   ` [PATCH v2 5/6] net/axgbe: add support for new port mode Namburu, Chandu-babu
2022-01-25 12:17 ` [PATCH v2 6/6] net/axgbe: alter the port speed bit range ssebasti
2022-01-25 16:21   ` Namburu, Chandu-babu
2022-01-27 14:31     ` Ferruh Yigit
2022-01-25 12:47 ` [PATCH v2 0/6] axgbe pmd updates Ferruh Yigit
2022-01-25 12:50 ` 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=20220125121747.344631-6-ssebasti@amd.com \
    --to=ssebasti@amd.com \
    --cc=dev@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).