From c716625d335eb5c0b54a433f6181d394f51ccca6 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 28 Oct 2019 17:22:11 +0000 Subject: The iwm_prepare_card_hw() call in iwm_attach() is only needed on 8k devices. Patch by Imre Vadasz. ok patrick@ --- sys/dev/pci/if_iwm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 490ed0fd8ed..0dd894ef182 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.256 2019/10/28 17:19:22 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.257 2019/10/28 17:22:10 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -7740,17 +7740,17 @@ iwm_attach(struct device *parent, struct device *self, void *aux) * "dash" value). To keep hw_rev backwards compatible - we'll store it * in the old format. */ - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) + if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { + uint32_t hw_step; + sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) | (IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2); - if (iwm_prepare_card_hw(sc) != 0) { - printf("%s: could not initialize hardware\n", DEVNAME(sc)); - return; - } - - if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) { - uint32_t hw_step; + if (iwm_prepare_card_hw(sc) != 0) { + printf("%s: could not initialize hardware\n", + DEVNAME(sc)); + return; + } /* * In order to recognize C step the driver should read the -- cgit v1.2.3