DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Chandubabu Namburu <chandu@amd.com>
Subject: [PATCH v2 13/13] net/axgbe: replace word abort
Date: Fri, 18 Aug 2023 10:45:37 -0700	[thread overview]
Message-ID: <20230818174537.290222-14-stephen@networkplumber.org> (raw)
In-Reply-To: <20230818174537.290222-1-stephen@networkplumber.org>

Use cancel instead of abort.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/axgbe/axgbe_common.h |  4 ++--
 drivers/net/axgbe/axgbe_ethdev.h |  2 +-
 drivers/net/axgbe/axgbe_i2c.c    | 26 +++++++++++++-------------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index a5d11c583210..9180848f525c 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -1123,8 +1123,8 @@
 #define IC_DATA_CMD_CMD_WIDTH			1
 #define IC_DATA_CMD_STOP_INDEX			9
 #define IC_DATA_CMD_STOP_WIDTH			1
-#define IC_ENABLE_ABORT_INDEX			1
-#define IC_ENABLE_ABORT_WIDTH			1
+#define IC_ENABLE_CANCEL_INDEX			1
+#define IC_ENABLE_CANCEL_WIDTH			1
 #define IC_ENABLE_EN_INDEX			0
 #define IC_ENABLE_EN_WIDTH			1
 #define IC_ENABLE_STATUS_EN_INDEX		0
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index 7f19321d881b..513b083c3b8b 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -271,7 +271,7 @@ struct axgbe_i2c_op_state {
 	unsigned int rx_len;
 	unsigned char *rx_buf;
 
-	unsigned int tx_abort_source;
+	unsigned int tx_cancel_source;
 
 	int ret;
 };
diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c
index a2798f484e72..917867f60b27 100644
--- a/drivers/net/axgbe/axgbe_i2c.c
+++ b/drivers/net/axgbe/axgbe_i2c.c
@@ -6,7 +6,7 @@
 #include "axgbe_ethdev.h"
 #include "axgbe_common.h"
 
-#define AXGBE_ABORT_COUNT	500
+#define AXGBE_CANCEL_COUNT	500
 #define AXGBE_DISABLE_COUNT	1000
 
 #define AXGBE_STD_SPEED		1
@@ -23,18 +23,18 @@
 #define AXGBE_I2C_READ		BIT(8)
 #define AXGBE_I2C_STOP		BIT(9)
 
-static int axgbe_i2c_abort(struct axgbe_port *pdata)
+static int axgbe_i2c_cancel(struct axgbe_port *pdata)
 {
-	unsigned int wait = AXGBE_ABORT_COUNT;
+	unsigned int wait = AXGBE_CANCEL_COUNT;
 
-	/* Must be enabled to recognize the abort request */
+	/* Must be enabled to recognize the cancel request */
 	XI2C_IOWRITE_BITS(pdata, IC_ENABLE, EN, 1);
 
-	/* Issue the abort */
-	XI2C_IOWRITE_BITS(pdata, IC_ENABLE, ABORT, 1);
+	/* Issue the cancel */
+	XI2C_IOWRITE_BITS(pdata, IC_ENABLE, CANCEL, 1);
 
 	while (wait--) {
-		if (!XI2C_IOREAD_BITS(pdata, IC_ENABLE, ABORT))
+		if (!XI2C_IOREAD_BITS(pdata, IC_ENABLE, CANCEL))
 			return 0;
 		rte_delay_us(500);
 	}
@@ -64,8 +64,8 @@ static int axgbe_i2c_disable(struct axgbe_port *pdata)
 
 	ret = axgbe_i2c_set_enable(pdata, false);
 	if (ret) {
-		/* Disable failed, try an abort */
-		ret = axgbe_i2c_abort(pdata);
+		/* Disable failed, try an cancel */
+		ret = axgbe_i2c_cancel(pdata);
 		if (ret)
 			return ret;
 
@@ -147,7 +147,7 @@ static void axgbe_i2c_clear_isr_interrupts(struct axgbe_port *pdata,
 	struct axgbe_i2c_op_state *state = &pdata->i2c.op_state;
 
 	if (isr & AXGBE_INTR_TX_ABRT) {
-		state->tx_abort_source = XI2C_IOREAD(pdata, IC_TX_ABRT_SOURCE);
+		state->tx_cancel_source = XI2C_IOREAD(pdata, IC_TX_ABRT_SOURCE);
 		XI2C_IOREAD(pdata, IC_CLR_TX_ABRT);
 	}
 
@@ -169,7 +169,7 @@ static int axgbe_i2c_isr(struct axgbe_port *pdata)
 	if (isr & AXGBE_INTR_TX_ABRT) {
 		PMD_DRV_LOG(DEBUG,
 			    "I2C TX_ABRT received (%#010x) for target %#04x\n",
-			    state->tx_abort_source, state->op->target);
+			    state->tx_cancel_source, state->op->target);
 
 		axgbe_i2c_disable_interrupts(pdata);
 
@@ -277,9 +277,9 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
 success:
 	ret = state->ret;
 	if (ret) {
-		if (state->tx_abort_source & IC_TX_ABRT_7B_ADDR_NOACK)
+		if (state->tx_cancel_source & IC_TX_ABRT_7B_ADDR_NOACK)
 			ret = -ENOTCONN;
-		else if (state->tx_abort_source & IC_TX_ABRT_ARB_LOST)
+		else if (state->tx_cancel_source & IC_TX_ABRT_ARB_LOST)
 			ret = -EAGAIN;
 	}
 
-- 
2.39.2


  parent reply	other threads:[~2023-08-18 17:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  2:52 [PATCH 00/14] remove use of term abort Stephen Hemminger
2023-08-18  2:52 ` [PATCH 01/14] jobstats: change jobstats_abort to jobstats_cancel Stephen Hemminger
2023-08-18  9:08   ` Bruce Richardson
2023-08-18 16:10     ` Stephen Hemminger
2023-08-18  2:52 ` [PATCH 02/14] all: remove use of word abort Stephen Hemminger
2023-08-18  4:04   ` Honnappa Nagarahalli
2023-08-18  2:52 ` [PATCH 03/14] pipeline: remove use of term abort Stephen Hemminger
2023-08-18  2:52 ` [PATCH 04/14] net/vmxnet3: replace abort() with rte_panic() Stephen Hemminger
2023-08-18  2:52 ` [PATCH 05/14] event/dlb2: remove word abort in comments Stephen Hemminger
2023-08-18  2:52 ` [PATCH 06/14] net/vdev_netvsc: replace use of term abort Stephen Hemminger
2023-08-18  2:52 ` [PATCH 07/14] net/netvsc: replace abort with cancel Stephen Hemminger
2023-08-18  2:52 ` [PATCH 08/14] net/ionic: remove word aborting Stephen Hemminger
2023-08-18  2:52 ` [PATCH 09/14] net/bnx2x: replace abort with cancel Stephen Hemminger
2023-08-18  2:52 ` [PATCH 10/14] net/mlx5: " Stephen Hemminger
2023-08-18  2:52 ` [PATCH 11/14] net/softnic: " Stephen Hemminger
2023-08-18  2:52 ` [PATCH 12/14] net/mlx4: remove word abort Stephen Hemminger
2023-08-18  2:52 ` [PATCH 13/14] sfc: remove use of term abort Stephen Hemminger
2023-08-18  2:52 ` [PATCH 14/14] net/axgbe: replace word abort Stephen Hemminger
2023-08-18 17:45 ` [PATCH v2 00/13] Replace us of term abort Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 01/13] jobstats: change jobstats_abort to jobstats_cancel Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 02/13] all: remove use of word abort Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 03/13] pipeline: remove use of term abort Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 04/13] net/vmxnet3: replace abort() with rte_panic() Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 05/13] event/dlb2: remove word abort in comments Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 06/13] net/vdev_netvsc: replace use of term abort Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 07/13] net/netvsc: replace abort with cancel Stephen Hemminger
2023-08-18 22:26     ` Long Li
2023-08-18 17:45   ` [PATCH v2 08/13] net/ionic: remove word aborting Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 09/13] net/bnx2x: replace abort with cancel Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 10/13] net/mlx5: " Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 11/13] net/softnic: " Stephen Hemminger
2023-08-18 17:45   ` [PATCH v2 12/13] net/mlx4: remove word abort Stephen Hemminger
2023-08-18 17:45   ` Stephen Hemminger [this message]
2023-08-30 16:49   ` [PATCH v2 00/13] Replace us of term abort Thomas Monjalon
2023-09-06 19:39     ` Stephen Hemminger
2023-09-06 21:19       ` Thomas Monjalon
2023-09-06 23:03         ` Stephen Hemminger

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=20230818174537.290222-14-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=chandu@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).