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 ECA05458ED; Tue, 3 Sep 2024 07:53:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA5334029A; Tue, 3 Sep 2024 07:53:09 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2127.outbound.protection.outlook.com [40.107.94.127]) by mails.dpdk.org (Postfix) with ESMTP id BB90F40295; Tue, 3 Sep 2024 07:53:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pv5L8ZT4r7Tt30SEWLH2vBH6TRi4M3IrtUMEV9zX3DbYrhI2jyKY0TOQUk7P4vyQZp4Mhie0KuNj6n1WXbcyH0XoxsxwIgzYW+5E27jLNtF+om+8/m3RqHUORcC30tJxO4NBqOhx+MUbrNTDrop32V9GYMMffr8kZll4hoyPluBpKOJSOpQDegyqknmToxoW4MsQjCQxoatciTgt3i3uds9FAa9Qblgla+h9opWW0cbKytgGP0hkDdXkr/rC78eQCDYhaKe0Oels8SzCHw5iuEFpY8bKNkvjrrH4oabOmsfbNDzwUxy0j+M15BrunENFkznIMA0Tm8HtC6qUtAytnw== 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=1I+rsCx4xqFzKaUCu60ZzFCkkWBMgdF02bJtD5R04SA=; b=m2LMgWKqHX2xjVi6kORWq9rn+3dsB0n0R32WB9u4v9jw9gUtyDGqlilGpqKedvzU11af4F4y/5ox7lDMbrSHiDro/RcBm0L1iajj5gGbv0+yEGHSHvQpLZz29RgG4hlYpp05VXC7xjPWs4Oea5XPOGglRL3RjYmALbpHdu41PuX3J3we6myQGatqSbYz20iLxJhKg9Bqk+Rb0el3JNdL2rx8fZbNWhokBd6ncwvEjI3H3qv2z8NDGvFVdLo2P8/thhBLQQFR3rKVfUwMaWNmMTQYEkpq2WNMr5+I/M9EbG8sPp9XieZ1P4ufraYIr4muPW/LYOwzjDv5SBIx1tFtng== 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=1I+rsCx4xqFzKaUCu60ZzFCkkWBMgdF02bJtD5R04SA=; b=RTKxsTv5pjzuYjMlEDjAzmDRfrGxTPZC4Y4lTid4GriUw77QtAW5yQVh90WN8V5XAExZJVeSrOnpoIyZShPBA5xAxZtCgfaQYfVMUwfM20IrgD0jF4vX1YNo90XdykRaB9Vbi54QgUwOBzqvzH3kOhvRW/vlGPh2J29FV6JdQpo= 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 SA1PR13MB6126.namprd13.prod.outlook.com (2603:10b6:806:335::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.23; Tue, 3 Sep 2024 05:53:00 +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.020; Tue, 3 Sep 2024 05:53:00 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , peng.zhang@corigine.com, stable@dpdk.org, Long Wu Subject: [PATCH 1/3] net/nfp: fix potential problem on certain version BSP Date: Tue, 3 Sep 2024 13:52:37 +0800 Message-Id: <20240903055239.2642656-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240903055239.2642656-1-chaoyong.he@corigine.com> References: <20240903055239.2642656-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0334.namprd03.prod.outlook.com (2603:10b6:a03:39c::9) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB6126:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a0473a4-8efb-4206-76b9-08dccbdcab24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jWbCcSZ7qlLpbGvEdAnCFd9NKYF/JSeknMjjbqMfJOtZ0LfH9kTld2E71GDq?= =?us-ascii?Q?FVAl0dcit8kXvyAtJ5R4p+ppMO7BLwLmBKE+kzhN5h9vwh6yF9Kdg4tixlgq?= =?us-ascii?Q?Yayqyd2v6PyUR7wGmNR5npEV7hee4S4U363ixE2s/suin8wef9qmngD6U5py?= =?us-ascii?Q?GnZ9uFDFYN+CB0wsjDbcICmSgrlcLZ6N/E5FvmQgx7b0zLLPBK7FGWwLhYB3?= =?us-ascii?Q?c7JVBojCyQaBDOUiwWCBLgIwKq+PCMy3eDRcrKlgZ5PQjI84JhjwaV8vBH1f?= =?us-ascii?Q?Ctdigh4GvLaHGHwKbK3f7If7Ak1VXaySaNDi5ajgztU7mfdbIOzn/GoneoqC?= =?us-ascii?Q?Us/Oq5+1FFYPVx0D36gC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7R2Z0UM+IV9qwhHB8EEh+xWiOoyT/1mFbrUuEk25bK2suxtZ61CJK3J?= =?us-ascii?Q?9r4V7SmWwWcpGxnlraxOdupoCxj/fn1gZkdm7Sl8zs6AcgpkmOPIzRe2s+PW?= =?us-ascii?Q?MV3n7W8uQUMwTcdVea9g3Fz5XHVtebwwOWzY0AHE9wq2s6w0eg=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)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?r6lF8rrEERLzna/UbQ6rv/++ztppITBOtA7yZ9q7+jcgNy6tzpp4jYBQn0Qm?= =?us-ascii?Q?gYksZB/TSR5im0dcLm1UWvmolnl/FbzQ4ghRwzbUEQHHnpd7IDG2DTrG5NfZ?= =?us-ascii?Q?b7TzkI9+Rko7XPKRIgpfiJuqCj0yLfZAJvntMZaBiAVLBe2SQPmfYFgohzvO?= =?us-ascii?Q?BhQHeWzZnkgycsDk0NU1eqp/b9jBeIaKV02AOEyT/HSvGDQ/xpLMdnzDvQ0h?= =?us-ascii?Q?yTlaY/BR/VpWQmpjLSsIR4mcEll1GE2EtPHQrb7u3+A92L9iJMywJAJJ8CL/?= =?us-ascii?Q?So45xACECcFc2VX/l+ey3By34jBtTVI3TuwQr4al3LYFsvBogtrffexXg57L?= =?us-ascii?Q?3HYNbxW22ey6CHYt1Z07YnjimrDky3GlsvLRuHMDlNU1MTfNRQo6zcm5APEG?= =?us-ascii?Q?RMknL4RsKFO7BjnmwcZUuIXfBHPa4skaqrM9+SoLy4et5yeK8whTobrL9Gub?= =?us-ascii?Q?Qc28aGYPqyFb+RA1p091b+x1uXUCXpoHG64mAGwhrs4B3MnXNMRqAnLKqBRK?= =?us-ascii?Q?/cro+xXViP2puhWz0Y//fC8Pgi2+THRcMons1BXL8m9QwIGikUPmYxUlHARU?= =?us-ascii?Q?slJNe0CM/kCf2DA/26nrh44No04beTStPCFkMToSTyf/zUwRRUg+reCKnTDF?= =?us-ascii?Q?8wdnArSwVKCHu4UO7YQG1RsBXvr9u9IacPhiE1Si+05uT6APjWYcJaB4rfKn?= =?us-ascii?Q?IdOnm3+BeJG5Wp1GB3yubjMtA17ZqIEfg5rS18g6caGqsStfGVUPxEznATyN?= =?us-ascii?Q?Xn7rZ4s3w2dSVYmKxBBhUYbnivZ7s6znIceTbBNByfhgngVy4V9iW/VxuM1u?= =?us-ascii?Q?KvN8ajuljoJawPny6B2j37bSo5fmW54fQ0IyV4DGofuXohGUzkzzKTLLnSD0?= =?us-ascii?Q?NmnCVpu34pFP20mF/Zpe3UU/z8bSaqb3LE8hjCQENNa4xMm27XSK4lHVXwa1?= =?us-ascii?Q?KfBb21gWshs/71sSW3dEWojYIJe9Q7oei7utIq4q0DUwGzXZ4dxQivTsu3ev?= =?us-ascii?Q?9D7+VwhYFpKRU9lpa6JU3SYMlrltMFEGhnnx4SsFTmyMEXqVCpztvJe4wURn?= =?us-ascii?Q?zwWjudSL+MIpgPo9EBNPUJPbpneOVad65uiZg1o6XgPYcMfFbXMW8Wr4VPB3?= =?us-ascii?Q?QHAGMb1017jMaDkzg/XfdAWidY864fqZoHVxEIJ1ly7fNtaHE8x1eFm8X8ph?= =?us-ascii?Q?PRQMwDv3Tj8NHp1G/ymEjmtUA1GboGkYPrmmgaxDHmQK26SLlSQ98qcUd1+k?= =?us-ascii?Q?bwg2wKRgFvb/jX3apqei55UU4oirnjnR8uG6Jxr29tgbx4Ld5ZO1Du4HhkHr?= =?us-ascii?Q?wcTDaL4qJyFIGGqjd0CDk1R2lLySXaVoPt5BnIsXNZJU+oEUwsB8cff+b7SW?= =?us-ascii?Q?npC5MeFQo6PbXrDNJfDlQHrglkJhzAPNydwpX1ksKGdpRGeNieDe+Vrjn9Sr?= =?us-ascii?Q?kIfwD064ELBdYrEw+r9WdiVzsggU/XQdJOHc8gYoMM08zvsZ4DRtJZEwyxE5?= =?us-ascii?Q?2r3n7U0Ke+2gXLX03l3bQAqE11ghI6S78IkmLTEp+nxtL/WA68Uj2GQ/yMiq?= =?us-ascii?Q?FD7r4TbOUQgHBt2vAb9AYYLKoG6Zkfkpfn3m9KQB9xlukTGdMsmW5Ie5RxNr?= =?us-ascii?Q?HA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a0473a4-8efb-4206-76b9-08dccbdcab24 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 05:53:00.7204 (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: BjEO2yc4QMJ4QBd8yTOzSWTDmoZSvhJGOFkaXF9Tkv8va2zWXkj/bsEVCojZS6VeDbN6KR5FiM20XaELtdkeqK4gHmUkhPEeNEi1YGwKldA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB6126 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 If BSP not support a command and the driver send it to BSP, some unhappy thing will happen and the logic will go wrong. Fix it by make sure the BSP does support the command before driver send it to BSP. Fixes: b301fd736003 ("net/nfp: add force reload firmware option") Cc: peng.zhang@corigine.com Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index a09bbe52ca..db12914afe 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -1407,7 +1407,7 @@ nfp_fw_reload_for_single_pf(struct nfp_nsp *nsp, int ret; bool fw_changed = true; - if (nfp_nsp_fw_loaded(nsp) && !force_reload_fw) { + if (nfp_nsp_has_fw_loaded(nsp) && nfp_nsp_fw_loaded(nsp) && !force_reload_fw) { ret = nfp_fw_check_change(cpp, fw_name, &fw_changed); if (ret != 0) return ret; @@ -1448,7 +1448,7 @@ nfp_fw_reload_for_multi_pf(struct nfp_nsp *nsp, goto keepalive_uninit; } - if (nfp_nsp_fw_loaded(nsp) && !reload_fw) { + if (nfp_nsp_has_fw_loaded(nsp) && nfp_nsp_fw_loaded(nsp) && !reload_fw) { err = nfp_fw_check_change(cpp, fw_name, &fw_changed); if (err != 0) goto keepalive_stop; -- 2.39.1