Message ID | 20240903055239.2642656-2-chaoyong.he@corigine.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ferruh Yigit |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 <chaoyong.he@corigine.com> To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>, peng.zhang@corigine.com, stable@dpdk.org, Long Wu <long.wu@corigine.com> 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: jWbCcSZ7qlLpbGvEdAnCFd9NKYF/JSeknMjjbqMfJOtZ0LfH9kTld2E71GDqFVAl0dcit8kXvyAtJ5R4p+ppMO7BLwLmBKE+kzhN5h9vwh6yF9Kdg4tixlgqYayqyd2v6PyUR7wGmNR5npEV7hee4S4U363ixE2s/suin8wef9qmngD6U5pyGnZ9uFDFYN+CB0wsjDbcICmSgrlcLZ6N/E5FvmQgx7b0zLLPBK7FGWwLhYB3c7JVBojCyQaBDOUiwWCBLgIwKq+PCMy3eDRcrKlgZ5PQjI84JhjwaV8vBH1fCtdigh4GvLaHGHw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XHVtebwwOWzY0AHE9wq2s6w0eg== 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: r6lF8rrEERLzna/UbQ6rv/++ztppITBOtA7yZ9q7+jcgNy6tzpp4jYBQn0QmgYksZB/TSR5im0dcLm1UWvmolnl/FbzQ4ghRwzbUEQHHnpd7IDG2DTrG5NfZb7TzkI9+Rko7XPKRIgpfiJuqCj0yLfZAJvntMZaBiAVLBe2SQPmfYFgohzvOBhQHeWzZnkgycsDk0NU1eqp/b9jBeIaKV02AOEyT/HSvGDQ/xpLMdnzDvQ0hyTlaY/BR/VpWQmpjLSsIR4mcEll1GE2EtPHQrb7u3+A92L9iJMywJAJJ8CL/So45xACECcFc2VX/l+ey3By34jBtTVI3TuwQr4al3LYFsvBogtrffexXg57L3HYNbxW22ey6CHYt1Z07YnjimrDky3GlsvLRuHMDlNU1MTfNRQo6zcm5APEGRMknL4RsKFO7BjnmwcZUuIXfBHPa4skaqrM9+SoLy4et5yeK8whTobrL9GubQc28aGYPqyFb+RA1p091b+x1uXUCXpoHG64mAGwhrs4B3MnXNMRqAnLKqBRK/cro+xXViP2puhWz0Y//fC8Pgi2+THRcMons1BXL8m9QwIGikUPmYxUlHARUslJNe0CM/kCf2DA/26nrh44No04beTStPCFkMToSTyf/zUwRRUg+reCKnTDF8wdnArSwVKCHu4UO7YQG1RsBXvr9u9IacPhiE1Si+05uT6APjWYcJaB4rfKnIdOnm3+BeJG5Wp1GB3yubjMtA17ZqIEfg5rS18g6caGqsStfGVUPxEznATyNXn7rZ4s3w2dSVYmKxBBhUYbnivZ7s6znIceTbBNByfhgngVy4V9iW/VxuM1uKvN8ajuljoJawPny6B2j37bSo5fmW54fQ0IyV4DGofuXohGUzkzzKTLLnSD0NmnCVpu34pFP20mF/Zpe3UU/z8bSaqb3LE8hjCQENNa4xMm27XSK4lHVXwa1KfBb21gWshs/71sSW3dEWojYIJe9Q7oei7utIq4q0DUwGzXZ4dxQivTsu3ev9D7+VwhYFpKRU9lpa6JU3SYMlrltMFEGhnnx4SsFTmyMEXqVCpztvJe4wURnzwWjudSL+MIpgPo9EBNPUJPbpneOVad65uiZg1o6XgPYcMfFbXMW8Wr4VPB3QHAGMb1017jMaDkzg/XfdAWidY864fqZoHVxEIJ1ly7fNtaHE8x1eFm8X8phPRQMwDv3Tj8NHp1G/ymEjmtUA1GboGkYPrmmgaxDHmQK26SLlSQ98qcUd1+kbwg2wKRgFvb/jX3apqei55UU4oirnjnR8uG6Jxr29tgbx4Ld5ZO1Du4HhkHrwcTDaL4qJyFIGGqjd0CDk1R2lLySXaVoPt5BnIsXNZJU+oEUwsB8cff+b7SWnpC5MeFQo6PbXrDNJfDlQHrglkJhzAPNydwpX1ksKGdpRGeNieDe+Vrjn9SrkIfwD064ELBdYrEw+r9WdiVzsggU/XQdJOHc8gYoMM08zvsZ4DRtJZEwyxE52r3n7U0Ke+2gXLX03l3bQAqE11ghI6S78IkmLTEp+nxtL/WA68Uj2GQ/yMiqFD7r4TbOUQgHBt2vAb9AYYLKoG6Zkfkpfn3m9KQB9xlukTGdMsmW5Ie5RxNrHA== 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
support load firmware from flash
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Chaoyong He
Sept. 3, 2024, 5:52 a.m. UTC
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 <chaoyong.he@corigine.com> Reviewed-by: Long Wu <long.wu@corigine.com> Reviewed-by: Peng Zhang <peng.zhang@corigine.com> --- 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;