From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Peng Zhang <peng.zhang@corigine.com>,
Chaoyong He <chaoyong.he@corigine.com>,
Long Wu <long.wu@corigine.com>
Subject: [PATCH 09/11] net/nfp: add nsp command to check if firmware is loaded
Date: Thu, 2 Nov 2023 10:23:19 +0800 [thread overview]
Message-ID: <20231102022321.2254224-10-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231102022321.2254224-1-chaoyong.he@corigine.com>
From: Peng Zhang <peng.zhang@corigine.com>
Add a NSP command to check if any firmware have been loaded.
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
drivers/net/nfp/nfpcore/nfp_nsp.c | 6 ++++++
drivers/net/nfp/nfpcore/nfp_nsp.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp.c b/drivers/net/nfp/nfpcore/nfp_nsp.c
index 589d878e0d..e5aaef8d55 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp.c
+++ b/drivers/net/nfp/nfpcore/nfp_nsp.c
@@ -637,6 +637,12 @@ nfp_nsp_load_fw(struct nfp_nsp *state,
return 0;
}
+bool
+nfp_nsp_fw_loaded(struct nfp_nsp *state)
+{
+ return nfp_nsp_command(state, SPCODE_FW_LOADED) > 0;
+}
+
int
nfp_nsp_read_eth_table(struct nfp_nsp *state,
void *buf,
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp.h b/drivers/net/nfp/nfpcore/nfp_nsp.h
index fe52dffeb7..492fa7e99f 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp.h
+++ b/drivers/net/nfp/nfpcore/nfp_nsp.h
@@ -212,5 +212,6 @@ enum nfp_nsp_sensor_id {
int nfp_hwmon_read_sensor(struct nfp_cpp *cpp, enum nfp_nsp_sensor_id id,
uint32_t *val);
+bool nfp_nsp_fw_loaded(struct nfp_nsp *state);
#endif /* __NSP_NSP_H__ */
--
2.39.1
next prev parent reply other threads:[~2023-11-02 2:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 2:23 [PATCH 00/11] Add the support of multiple PF Chaoyong He
2023-11-02 2:23 ` [PATCH 01/11] net/nfp: refactor the probe logic of the secondary process Chaoyong He
2023-11-02 2:23 ` [PATCH 02/11] net/nfp: fix the failure to initialize the LSC mask Chaoyong He
2023-11-02 2:23 ` [PATCH 03/11] net/nfp: fix the DMA error caused by app exit abnormally Chaoyong He
2023-11-02 2:23 ` [PATCH 04/11] net/nfp: add flag to indicate multiple PFs support Chaoyong He
2023-11-02 2:23 ` [PATCH 05/11] net/nfp: add major version to nsp commands Chaoyong He
2023-11-02 2:23 ` [PATCH 06/11] net/nfp: adjust physical port check for multiple PFs Chaoyong He
2023-11-02 2:23 ` [PATCH 07/11] net/nfp: add the check about the firmware load Chaoyong He
2023-11-02 2:23 ` [PATCH 08/11] net/nfp: add PF ID used to format symbols Chaoyong He
2023-11-02 2:23 ` Chaoyong He [this message]
2023-11-02 2:23 ` [PATCH 10/11] net/nfp: introduce keepalive mechanism for multiple PF Chaoyong He
2023-11-02 2:23 ` [PATCH 11/11] drivers: enable multiple PF in application firmware Chaoyong He
2023-11-02 14:52 ` [PATCH 00/11] Add the support of multiple PF Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231102022321.2254224-10-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).