qat: Fix firmware module autoloading

If firmware_get() fails to find a loaded firmware image, it searches for
candidate KLDs to load.  It will search for a KLD containing a module
with the same name as the requested image, and failing that, will load a
KLD with the same basename as the requested image.

The module name given by fw_stub.awk is simply "<mangled KLD name>_fw".

QAT firmware modules contain two images, neither of which match either
of the names used during lookup, so automatic loading of firmware images
after mountroot does not work.  Work around this by using the same
string for the first image name and for the KLD basename.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Mark Johnston 2020-11-30 20:53:25 +00:00
parent 8459188a56
commit 7695ced633
10 changed files with 10 additions and 10 deletions

View File

@ -169,7 +169,7 @@
/* AE firmware */
#define AE_FW_PROD_TYPE_C2XXX 0x00800000
#define AE_FW_MOF_NAME_C2XXX "mof_firmware_c2xxx"
#define AE_FW_MOF_NAME_C2XXX "qat_c2xxxfw"
#define AE_FW_MMP_NAME_C2XXX "mmp_firmware_c2xxx"
#define AE_FW_UOF_NAME_C2XXX_A0 "icp_qat_nae.uof"
#define AE_FW_UOF_NAME_C2XXX_B0 "icp_qat_nae_b0.uof"

View File

@ -168,7 +168,7 @@
/* AE firmware */
#define AE_FW_PROD_TYPE_C3XXX 0x02000000
#define AE_FW_MOF_NAME_C3XXX "qat_c3xxx"
#define AE_FW_MOF_NAME_C3XXX "qat_c3xxxfw"
#define AE_FW_MMP_NAME_C3XXX "qat_c3xxx_mmp"
#define AE_FW_UOF_NAME_C3XXX "icp_qat_ae.suof"

View File

@ -191,7 +191,7 @@
/* AE firmware */
#define AE_FW_PROD_TYPE_C62X 0x01000000
#define AE_FW_MOF_NAME_C62X "qat_c62x"
#define AE_FW_MOF_NAME_C62X "qat_c62xfw"
#define AE_FW_MMP_NAME_C62X "qat_c62x_mmp"
#define AE_FW_UOF_NAME_C62X "icp_qat_ae.suof"

View File

@ -191,7 +191,7 @@
/* AE firmware */
#define AE_FW_PROD_TYPE_D15XX 0x01000000
#define AE_FW_MOF_NAME_D15XX "qat_d15xx"
#define AE_FW_MOF_NAME_D15XX "qat_d15xxfw"
#define AE_FW_MMP_NAME_D15XX "qat_d15xx_mmp"
#define AE_FW_UOF_NAME_D15XX "icp_qat_ae.suof"

View File

@ -109,7 +109,7 @@
/* AE firmware */
#define AE_FW_PROD_TYPE_DH895XCC 0x00400000
#define AE_FW_MOF_NAME_DH895XCC "qat_895xcc"
#define AE_FW_MOF_NAME_DH895XCC "qat_895xccfw"
#define AE_FW_MMP_NAME_DH895XCC "qat_895xcc_mmp"
#define AE_FW_UOF_NAME_DH895XCC "icp_qat_ae.uof"

View File

@ -6,6 +6,6 @@ KMOD= qat_c2xxxfw
IMG1= mmp_firmware_c2xxx
IMG2= mof_firmware_c2xxx
FIRMWS= ${IMG1}.bin:${IMG1}:111 ${IMG2}.bin:${IMG2}:111
FIRMWS= ${IMG1}.bin:${KMOD}:111 ${IMG2}.bin:${IMG2}:111
.include <bsd.kmod.mk>

View File

@ -6,6 +6,6 @@ KMOD= qat_c3xxxfw
IMG1= qat_c3xxx
IMG2= qat_c3xxx_mmp
FIRMWS= ${IMG1}.bin:${IMG1}:111 ${IMG2}.bin:${IMG2}:111
FIRMWS= ${IMG1}.bin:${KMOD}:111 ${IMG2}.bin:${IMG2}:111
.include <bsd.kmod.mk>

View File

@ -6,6 +6,6 @@ KMOD= qat_c62xfw
IMG1= qat_c62x
IMG2= qat_c62x_mmp
FIRMWS= ${IMG1}.bin:${IMG1}:111 ${IMG2}.bin:${IMG2}:111
FIRMWS= ${IMG1}.bin:${KMOD}:111 ${IMG2}.bin:${IMG2}:111
.include <bsd.kmod.mk>

View File

@ -6,6 +6,6 @@ KMOD= qat_d15xxfw
IMG1= qat_d15xx
IMG2= qat_d15xx_mmp
FIRMWS= ${IMG1}.bin:${IMG1}:111 ${IMG2}.bin:${IMG2}:111
FIRMWS= ${IMG1}.bin:${KMOD}:111 ${IMG2}.bin:${IMG2}:111
.include <bsd.kmod.mk>

View File

@ -6,6 +6,6 @@ KMOD= qat_dh895xccfw
IMG1= qat_895xcc
IMG2= qat_895xcc_mmp
FIRMWS= ${IMG1}.bin:${IMG1}:111 ${IMG2}.bin:${IMG2}:111
FIRMWS= ${IMG1}.bin:${KMOD}:111 ${IMG2}.bin:${IMG2}:111
.include <bsd.kmod.mk>