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 B9DA343000; Fri, 18 Aug 2023 04:54:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC29B43296; Fri, 18 Aug 2023 04:53:19 +0200 (CEST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by mails.dpdk.org (Postfix) with ESMTP id BAC7D43269 for ; Fri, 18 Aug 2023 04:53:13 +0200 (CEST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-1bff2d2c141so252302fac.1 for ; Thu, 17 Aug 2023 19:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692327193; x=1692931993; 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=x/059GDUMZciHxXtI9wy1aP3TtCpWPihifdPrlDKe9Hf6h2/q0jI83xHCGc1oOyeMr hCsdCHHyqpuqSlEPiUHJYAmBuS9dS7QIw9OhDzDAthEAhLvkady6gGacOQSqrW7pZc/K bn8vp4PlxKXsRPaigHh1b+2VPBrTnnYL/xQXc6EMItah+aiG01ZbojUFheirQcosi9Nj +U3jAYxT098mG4PSRoAUHYCHV2Zhqu9Q1KXUk0kQyquZxuL7lJbMlwnUv5ZnR2d6HZ1i hmTXLbthWguNOMqb5h7hEATTKfsXQKFoek7SyAK0KVNAmBK88BY6dLABpVEBeKbZOd/H 1sGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692327193; x=1692931993; 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=JIyd968Z6FHRzuCgpFJaffc9s+wCiE7uutj5WPZMX64aLLq3zruHEfr84GybwzLpNs nrcB26DVZ8/niRE2keuV9P3SB5x+7LonR+//8PYemW0Yx+roZshaIqj1kSxzfK/MgV9v W1f/hWlhwAG7NkaXRIt7v1p07HNLG1XZuCUKV3t4PEbRalZw/xCMJ4uRsn7sv3NVpBnr yqjE1F7V2H60cFQgkl0PQs/+M12mec3C+KIPiAGmJj3Cut0dTknUQva8x9njh8T4my85 flHKGjaFEHRMhn7+UMIbYvB3ppr8DF2rtb1HR9w0vjADcO7/ImkaPNE0HIgGHBifzUMK h0+Q== X-Gm-Message-State: AOJu0Yw+AUWDj8PslaUczXSO6v9D48dyIU7c/tj6FykCvsw3Bpf9EpSY /3rhuAXHRwWSTkPuj8NwLRBW1AAl0CcmZK2YuRtlRg== X-Google-Smtp-Source: AGHT+IGpza9ks/iQD5YJCh2gATbMM59VFFpn83T51mdOe5zy2eEBJNbAFFrzM9TWNiuxhshMYXxomQ== X-Received: by 2002:a05:6870:73c6:b0:1be:e925:3dce with SMTP id a6-20020a05687073c600b001bee9253dcemr1501814oan.7.1692327192865; Thu, 17 Aug 2023 19:53:12 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id ep13-20020a17090ae64d00b00262e485156esm2221246pjb.57.2023.08.17.19.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 19:53:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH 14/14] net/axgbe: replace word abort Date: Thu, 17 Aug 2023 19:52:49 -0700 Message-Id: <20230818025249.33994-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230818025249.33994-1-stephen@networkplumber.org> References: <20230818025249.33994-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