From b0cd4990340a83d642df72b0ac03deb5aa5ca7fa Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 10 Jan 2018 02:07:11 +0000 Subject: [PATCH] Don't reset the internal memory core on chips other than the Broadcom 43602, as it's only necessary on that specific chip. Found the hard way by jcs@ on a MacBook 12-inch (2017) --- sys/dev/pci/if_bwfm_pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index b1769c8d012..0c3d527cba2 100644 --- a/sys/dev/pci/if_bwfm_pci.c +++ b/sys/dev/pci/if_bwfm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_pci.c,v 1.12 2018/01/10 01:43:01 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.13 2018/01/10 02:07:11 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt @@ -699,8 +699,10 @@ bwfm_pci_load_microcode(struct bwfm_pci_softc *sc, const u_char *ucode, size_t s /* TODO: restore NVRAM */ /* Load reset vector from firmware and kickstart core. */ - core = bwfm_chip_get_core(bwfm, BWFM_AGENT_INTERNAL_MEM); - bwfm->sc_chip.ch_core_reset(bwfm, core, 0, 0, 0); + if (bwfm->sc_chip.ch_chip == BRCM_CC_43602_CHIP_ID) { + core = bwfm_chip_get_core(bwfm, BWFM_AGENT_INTERNAL_MEM); + bwfm->sc_chip.ch_core_reset(bwfm, core, 0, 0, 0); + } bwfm_chip_set_active(bwfm, *(uint32_t *)ucode); for (i = 0; i < 40; i++) { -- 2.20.1