Module Name: src Committed By: jmcneill Date: Mon Dec 18 12:36:16 UTC 2017
Modified Files: src/sys/dev/ic: bwfm.c Log Message: Stop the device at attach in case it was previously initialized To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/bwfm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.4 src/sys/dev/ic/bwfm.c:1.5 --- src/sys/dev/ic/bwfm.c:1.4 Mon Oct 23 15:21:10 2017 +++ src/sys/dev/ic/bwfm.c Mon Dec 18 12:36:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.4 2017/10/23 15:21:10 jmcneill Exp $ */ +/* $NetBSD: bwfm.c,v 1.5 2017/12/18 12:36:16 jmcneill Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -149,6 +149,9 @@ bwfm_attach(struct bwfm_softc *sc) pcq_put(sc->sc_freetask, t); } + /* Stop the device in case it was previously initialized */ + bwfm_fwvar_cmd_set_int(sc, BWFM_C_DOWN, 1); + if (bwfm_fwvar_cmd_get_int(sc, BWFM_C_GET_VERSION, &tmp)) { printf("%s: could not read io type\n", DEVNAME(sc)); return;