From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E59E4309A; Fri, 18 Aug 2023 19:48:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0BBD43293; Fri, 18 Aug 2023 19:47:02 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id BC3384325D for ; Fri, 18 Aug 2023 19:46:56 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-68872ca740bso980153b3a.2 for ; Fri, 18 Aug 2023 10:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692380816; x=1692985616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FXfHoITIXKtskf4Yk2sBcoNEbqQ0+cp/jvCbRjceZnw=; b=0djCmw4B5XE9X34aAYHFJzto9rCIXO+X84pk5Q4yRmJ2EuP8WNqkVlYdEHC/7YRbYY qTJi1aWnyD/r35v9Ks/Kl9nGFmVURbjOhTg9SfCQ3nhDFc35A6cSuQRRT28LJKF9G+3d 0iXkUudYGnygcPfjxbGXcA1v7hh+3efGQPs52f8TepfU8Rf22R2IAo4tfA3y4JiPg8tW HSGLVKzCym82SrlK0MTyzrsTuppdNQQJN8CN3wg5j7ZpTxXVuTPkX1MiwY3FPVoQAGWg TfactEedllbG9dhdJ4U58aS6fMBNgFFV42/qez4oiuvlSGCwjJWbejb4WsJJtzM8fcp5 Bxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692380816; x=1692985616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FXfHoITIXKtskf4Yk2sBcoNEbqQ0+cp/jvCbRjceZnw=; b=EG66UElUnbRSXwoE+YSnBAJP2ElXNpVsXIDHeX8CJyhgI36H92tbGAW+kuuNPev7uc BSCnP7EOar+N6zgE3/9zmNtr7G54E9wax7GZU07nuu/vh6PgjipSThr3LTYtB2MSiYdr O3QD6bEzMs84AqXvm/PIko2nS9aSaKJ4pn5KGvfcEe8Qzj9S9xwGpX5s3glpAiuyDvlO gGek9ggoUmok5GbRBVPyKAWDSWbP479o4JFWSQoxXqQkRFe8YmRtuq+3AMOhM9xLj+qp SvBTRQYhBI3exq5nscXYftlwd4n6YAOC3dHnXGTq9gCMIQ0Ony/QRCUQ/1QtsAJTYh5c C9zQ== X-Gm-Message-State: AOJu0YxXxjvN6DmN/T+msCI01Ub4bs2WrdmGbT0mKrWFmlZ+vpWdZlXA RSM5GJUHNY7lssVxESWF+2EBhTufWg/or7vb8j1kpA== X-Google-Smtp-Source: AGHT+IHYel7vYUa+yeDjAJV013KFI1BQB52KHZ+WnuIqTnK5om575Bg3OrD067uo/XdTkcZEqdpQjg== X-Received: by 2002:a05:6a00:1593:b0:687:5c3f:d834 with SMTP id u19-20020a056a00159300b006875c3fd834mr4495741pfk.11.1692380815763; Fri, 18 Aug 2023 10:46:55 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id u20-20020aa78394000000b0066a2e8431a0sm1804610pfm.183.2023.08.18.10.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 10:46:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH v2 13/13] net/axgbe: replace word abort Date: Fri, 18 Aug 2023 10:45:37 -0700 Message-Id: <20230818174537.290222-14-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230818174537.290222-1-stephen@networkplumber.org> References: <20230818025249.33994-1-stephen@networkplumber.org> <20230818174537.290222-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use cancel instead of abort. Signed-off-by: Stephen Hemminger --- 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