On Fri, Mar 13, 2026 at 03:43:36PM +1100, David Leadbeater wrote:
> I don't have BZ hardware to test with, but AX201 works again with the
> below that reverts the changes in iwx_ctxt_info_init. (sc_hw_rev isn't
> what was directly read, per "In the 8000 HW family the format of the 4
> bytes of CSR_HW_REV have changed"... in iwx_attach.)
Thanks David!
Your patch does not work on BZ as-is. We need a mix of the old and the
new code. I have committed the diff below. This works on BZ, and on my
AX210 which unfortunately wasn't affected by this issue in the first
place (the problem seems to depend on the HW revision mac ID bit pattern).
M sys/dev/pci/if_iwx.c | 8+ 2-
1 file changed, 8 insertions(+), 2 deletions(-)
commit - 7ed008f9564d36435bd789cd2da574d6a032ea7a
commit + cbd10e68d5fa8182135f70d3ae6d97cb553042bb
blob - 68c176c926b3a18ca623fd5adb4a16df26996b3a
blob + 18c729502be8449237d74dd4a0cd3c07cf2968f4
--- sys/dev/pci/if_iwx.c
+++ sys/dev/pci/if_iwx.c
@@ -922,7 +922,8 @@ iwx_ctxt_info_init(struct iwx_softc *sc, const struct
memset(ctxt_info, 0, sizeof(*ctxt_info));
ctxt_info->version.version = 0;
- ctxt_info->version.mac_id = htole16(sc->sc_hw_rev);
+ ctxt_info->version.mac_id =
+ htole16((uint16_t)IWX_READ(sc, IWX_CSR_HW_REV));
/* size is in DWs */
ctxt_info->version.size = htole16(sizeof(*ctxt_info) / 4);
@@ -1017,7 +1018,12 @@ iwx_ctxt_info_gen3_init(struct iwx_softc *sc, const st
memset(prph_scratch, 0, sizeof(*prph_scratch));
prph_sc_ctrl = &prph_scratch->ctrl_cfg;
prph_sc_ctrl->version.version = 0;
- prph_sc_ctrl->version.mac_id = htole16(sc->sc_hw_rev);
+ if (sc->sc_device_family >= IWX_DEVICE_FAMILY_BZ)
+ prph_sc_ctrl->version.mac_id = htole16(sc->sc_hw_rev);
+ else {
+ prph_sc_ctrl->version.mac_id = htole16(IWX_READ(sc,
+ IWX_CSR_HW_REV));
+ }
prph_sc_ctrl->version.size = htole16(sizeof(*prph_scratch) / 4);
control_flags = IWX_PRPH_SCRATCH_RB_SIZE_4K |