From b57370d64c440d7c4d5594a677fb066e3786fbfc Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 20 Jul 2021 16:00:47 +0000 Subject: [PATCH] Do not attempt to load 7265D iwm(4) firmware on all 7265 devices. There are several variants of 7265 devices, all of which share a PCI ID. 7265D devices can be told apart by looking at the hardware revision number. Non-D 7265 devices won't load 7265D firmware. Load the 7265-17 image instead. Problem reported and fix tested on a non-D 7265 by Tilo Stritzky. Tested on a 7265D by myself. --- sys/dev/pci/if_iwm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index a3c97a31255..00212d2924e 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.356 2021/07/20 14:44:37 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.357 2021/07/20 16:00:47 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -11106,7 +11106,11 @@ iwm_attach(struct device *parent, struct device *self, void *aux) break; case PCI_PRODUCT_INTEL_WL_7265_1: case PCI_PRODUCT_INTEL_WL_7265_2: - sc->sc_fwname = "iwm-7265D-29"; + if ((sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) == + IWM_CSR_HW_REV_TYPE_7265D) + sc->sc_fwname = "iwm-7265D-29"; + else + sc->sc_fwname = "iwm-7265-17"; sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; -- 2.20.1