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 38B8445909; Thu, 5 Sep 2024 08:26:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B1FF42DF1; Thu, 5 Sep 2024 08:25:56 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2105.outbound.protection.outlook.com [40.107.92.105]) by mails.dpdk.org (Postfix) with ESMTP id 1F70942E36; Thu, 5 Sep 2024 08:25:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s2loXX9STNU7jUaG9x9zKLUSq1qH3Xeog5YPScUWk6qbHTdRnN2eoeUqQxikEuw3z68GnOeN5gY1G1pEKrLx7vmgcSTRsQc3g7k5LBdQccvSy6JWi2m3oozVeTbnrp1KCtYzSYCULlSICry0xpKv5FkLsZXad5y9r/lAANZg5sJ7HsT1ycy8Wf75CKXGym0Sdkr6IlB7yiPzfC0Cs4RuaPgVbPqwxBzAYf9K05hMQ6aJlHQK9uYwfUsimRjexO9EyZoQx3c+AtUvVEoHimp5roWIZgGs+DlahWGko9Ovc0PwW65gyXs3IFGOsd3vnjFvgytJSBLwkILAVXoelg8WuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sVqCH3dQSrHKzfnfb/youDHFB/Q5lLCqk5HjFrpPcxo=; b=jwgPpKu1KZl2EckcdOkxrYUQ18Qo7syrXKbupueQQ2XDKPw9wTvKbBz0Wh1DqDQeK+Fvj7+f+ftxZiCCb3+P7WP7EdLJ18ipvz+/3u37+cF50QUs514C1NPdWuvxA4btwWlHONhJJmiK3TcfHJ2A9voOutoWosfWSih9Y0vUnpIqPKlpcR48gntDZ1zrfrlB0UQF8HESnBJJRwiBQGv80J8UqwfedCD2pcEyXW3FW+BXtlsjygUcM2ow5JMHpd0gAj+Uj/LYZIzhItZmu7BHVJygpAkg0Kol3iddVe21U36/pi+VJArfuHXm6TqPGDoaI4UszAU34zMUz9SPeX8Xbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sVqCH3dQSrHKzfnfb/youDHFB/Q5lLCqk5HjFrpPcxo=; b=kc4klSHUbeGTaGl/KWQOc9fF74RajABwBjtdexSRrr6IQilwCHzU4SBnqbTGy2xw8/VwWUrN5Se0MfIn/d+64Ee6k9xWVM6pA+XNe/uEEFXN5+fbRDPH3gnrrii80o1omiaiaGA2ooaik3NRPGWwstqjorBYOK7hm346R0C0QFI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by DM6PR13MB4147.namprd13.prod.outlook.com (2603:10b6:5:2a0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Thu, 5 Sep 2024 06:25:52 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7918.024; Thu, 5 Sep 2024 06:25:52 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Qin Ke , chaoyong.he@corigine.com, stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 8/8] net/nfp: fix representor port link status update problem Date: Thu, 5 Sep 2024 14:25:11 +0800 Message-Id: <20240905062511.2710102-9-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240905062511.2710102-1-chaoyong.he@corigine.com> References: <20240905062511.2710102-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGAP274CA0017.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::29) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM6PR13MB4147:EE_ X-MS-Office365-Filtering-Correlation-Id: 3415b687-cf6c-45cb-c278-08dccd739784 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9yAJh+Pw2UJK9MdT2t8jVfPSZng6ZU8rKmIxe+t12tjWXz/kEzJ1zHNPaG+1?= =?us-ascii?Q?2FfSUcjpzy41hEd9k8V36R2kkjdX51W53I7uus/gtQuee+oz4+brt76twKHF?= =?us-ascii?Q?z2mcjDSQoSW62YBV6Wuaf5N6w9pB55C1MLiZ7wdNLfY3qY38p6Pq34CDItOH?= =?us-ascii?Q?heGdHsipUzmU/ptClrt8B6LvknZ7N44auctxhGJYwrgs3BEL4+o8DSjUgKy2?= =?us-ascii?Q?Bls3lw0qawRI+aNHGsw/dgUQUumZ2ZRzj9HEQk8WJknheRBm2IBRZ6fYGt2b?= =?us-ascii?Q?WWlm1mk8WNL/cl0+mksxQOexvRPZMfkgDDuFXwGe2zjcSknGLqFyHfkEQs5X?= =?us-ascii?Q?H37znCY2H4BNkox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?Q?4eO2vVmMGkY2xYQ4lB3uvYMA+6Bpy2gWcMVlWhjVaF+i7g6Q7wmqV6pTJiVT?= =?us-ascii?Q?mgFYI4UcOJaVpqUcHKKRDmIWgrJFkJoLqEcIWuDCjtPtuwttkaLTkH3BANyu?= =?us-ascii?Q?hdDzwQTbMqEJHoUBa7K/tVq1KATBIDj4IVMoOkPM+9/HMTknRw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HglrrOsvkurl7TAhQRbFw2fl0ibw/5TK4MfAtzlrhyrZUwRu0Rv1Wcu6QaXU?= =?us-ascii?Q?HlPphOuAxzJEoJFZqv8AWGcWEaz74avpoAMg23kf7WIaI1CAQiJnuBmd5ThY?= =?us-ascii?Q?5QR4jUbY0i8kMtqWGFN6yySEvBxMLLL5EHvG/44IYRROsCXFZvuJjuvraeV2?= =?us-ascii?Q?9XiW4TLW2jSWK0wRrlhe6BNeR/YWtqZZmnIAUHuY/VfJsqJYQgWl4qFpQJCf?= =?us-ascii?Q?cOCPKVmo2TPsL4igR8JsRd2F99bggAy0cwM//fTFAh3/Oa6EuDVRh2w9Adgq?= =?us-ascii?Q?uyVBvcZ/GHeTAudYKzEU8nM7FCZgbkBN+TxW73vK64aTLXg/OjzKAfM/SYoH?= =?us-ascii?Q?2fNstkcDXTV2BZFqMSrts/p0LfK4fi3homOjesU1pnnwUnmXF2Nl82GOxQu8?= =?us-ascii?Q?dfoNJgZBVl0zRdHhpZ0F/C8iT+6u6mAHwz/mll21MybF+A6DhyWL+BXayfvx?= =?us-ascii?Q?Jnd02H2qIAp07rbRwxymQPJrqxSDSpRf/SS8FdZnGpU/7ixFh0jJ3WeGHVMM?= =?us-ascii?Q?l81FTC1+WJ+aDm+XezFrxMKhNK3xvICbbQNYEq1BEmZEpfwxvFNh5NZDXET7?= =?us-ascii?Q?D/jcHHGusZVkSu9od8tFrNvgsRR5gN4D8+3gboUMknTXwjAgFeOnhzimP0X6?= =?us-ascii?Q?HR09r3x+7KJudM/CGnBDMtjHR9bv5qhUc91N5cw+UxazhiVC/2rztQeO/P5d?= =?us-ascii?Q?l/3Afrdf124mCXQ3uydLIUixM8z5VyNSv0Nym+9Tq0uMLI3O08nk6BpCkEnR?= =?us-ascii?Q?G318rfgoCPVSi3T2POZ4Izt2Byg7HwjnmTdr01ZQPKqNXlVihpOH005/zdio?= =?us-ascii?Q?iebNrm8qfdbQCX/FrB92mp37BGw9zLs09RsgCqC5FTZDslZko7zL69RbNNrr?= =?us-ascii?Q?1MkA/ps/8oKBhCGNX2AImDPIo3nKoPgV54hP9I2sivt8KaKac65JHCjXCBxj?= =?us-ascii?Q?WTyOGI9lM2PUDNvaTsYblU6HowGk122p8PQvQ8N6BaioLSSP+2q0M+ln+fat?= =?us-ascii?Q?bKAHNqgXeFIXIseIqQJ858AFriV4N7vsKxjx45WbtOf6HrGjcY6C0x7iz0yK?= =?us-ascii?Q?z8MP56zJ4rDeEg1IdYZDtH+U3NHxFfiVW7TZijdk2j9QDXWPVXKCYEqe3Pb8?= =?us-ascii?Q?QzT97P0ruJBpo2XiWLA5ab14ACWlfqC+G6nMImvbzxnurm8BXKIR0VRk2MIO?= =?us-ascii?Q?UYMYXuVe74p0JXPmnHeo0b6133YUt0/hMvhYFZXh57pm0OlzWxYXs4OSIVfg?= =?us-ascii?Q?dOQgwlMlAFnhk7+Fjn/AVX8AqYXslojqunBuUVh0auEXfQIysozXg5/yvFqs?= =?us-ascii?Q?rt7xNd88suRLeAf8opeXKLT/pGm160qrWUIvENZBBbTREEO1tcMUbtJ28w11?= =?us-ascii?Q?7DfDro8MBrk1S9/XTITN7WU/wGRMn8v7SnTi/v7UAhQGrn47s0e5rHjEoTvh?= =?us-ascii?Q?iNn+nr4tn8lMemghaqUErpma9rhMdEZVpvjZ7U1X5Xx46c5CzrqCiJlZvVgb?= =?us-ascii?Q?Rd/zGmRemZhst8a4/2v6Pqmr+uM3qjDRyG7E9KQZAUPKc07iUd4tlaVd61yo?= =?us-ascii?Q?UhXRdJkz4BPXlS/upZ7tdfTU65lsQq+hHwWobl0lMnX7Z+vaunEzdeztMI4k?= =?us-ascii?Q?LA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3415b687-cf6c-45cb-c278-08dccd739784 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2024 06:25:52.8353 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q4tWaajXeswlv5XIUIiH8u3EGsffLCohoioX3r0eDdUjX6unC5HRtM3KOtrabO+np8ssQv/1I0Rupo7nhXk+LASnjEQhXJUsDjwkStdf3rQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB4147 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 From: Qin Ke The link status of representor port is reported by the flower firmware through control message and it already parsed and stored in the 'link' field of representor port structure. The original logic read link status from the control BAR again, and use it rather then the 'link' field of the representor port structure in the following logic wrongly. Fix this by delete the read control BAR statement and use the right link status value. Fixes: c4de52eca76c ("net/nfp: remove redundancy for representor port") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Qin Ke Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_representor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 054ea1a938..5db7d50618 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -29,18 +29,13 @@ nfp_flower_repr_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) { int ret; - uint32_t nn_link_status; - struct nfp_net_hw *pf_hw; struct rte_eth_link *link; struct nfp_flower_representor *repr; repr = dev->data->dev_private; link = &repr->link; - pf_hw = repr->app_fw_flower->pf_hw; - nn_link_status = nn_cfg_readw(&pf_hw->super, NFP_NET_CFG_STS); - - ret = nfp_net_link_update_common(dev, link, nn_link_status); + ret = nfp_net_link_update_common(dev, link, link->link_status); return ret; } -- 2.39.1