path: root/sys/sys/firmware.h
diff options
authorBjoern A. Zeeb <bz@FreeBSD.org>2021-01-25 22:41:50 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2021-01-27 13:51:26 +0000
commit6f65b505468aa8cedc57235604bd8df540d42735 (patch)
tree9f4ea287001a010c95ed23edf2823b6318f2e56f /sys/sys/firmware.h
parentbcb7f57aa22757dd0206e88894bc003a93d0c351 (diff)
firmware(9): extend firmware_get() by a "no warn" flag.
With the upcoming usage from LinuxKPI but also from drivers ported natively we are seeing more probing of various firmware (names). Add the ability to firmware(9) to silence the "firmware image loading/registering errors" by adding a new firmware_get_flags() functions extending firmware_get() and taking a flags argument as firmware_put() already does. Requested-by: zeising (for future LinuxKPI/DRM) Sponsored-by: The FreeBSD Foundation Sponsored-by: Rubicon Communications, LLC ("Netgate") MFC after: 3 days Reviewed-by: markj Differential Revision: https://reviews.freebsd.org/D27413
Diffstat (limited to 'sys/sys/firmware.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/sys/firmware.h b/sys/sys/firmware.h
index 8a9b2cf23bd7..0d74a749f4fc 100644
--- a/sys/sys/firmware.h
+++ b/sys/sys/firmware.h
@@ -60,7 +60,12 @@ struct firmware {
const struct firmware *firmware_register(const char *,
const void *, size_t, unsigned int, const struct firmware *);
int firmware_unregister(const char *);
+#define FIRMWARE_GET_NOWARN 0x0001 /* Do not warn if firmware not found. */
+const struct firmware *firmware_get_flags(const char *, uint32_t flags);
const struct firmware *firmware_get(const char *);
#define FIRMWARE_UNLOAD 0x0001 /* unload if unreferenced */
void firmware_put(const struct firmware *, int);
#endif /* _SYS_FIRMWARE_H_ */