From 44c68782f1ed08ced316a00718cfe0bc2528a57a Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Wed, 2 Jan 2019 05:37:30 +0000 Subject: [PATCH] rtwn(4): do not try to start RTL8188E* MCU during device shutdown. MFC after: 4 days --- sys/dev/rtwn/rtl8188e/r88e_fw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/rtwn/rtl8188e/r88e_fw.c b/sys/dev/rtwn/rtl8188e/r88e_fw.c index 4ae4abbda1d7..dbce406b8b90 100644 --- a/sys/dev/rtwn/rtl8188e/r88e_fw.c +++ b/sys/dev/rtwn/rtl8188e/r88e_fw.c @@ -109,7 +109,11 @@ r88e_fw_reset(struct rtwn_softc *sc, int reason) reg = rtwn_read_2(sc, R92C_SYS_FUNC_EN); rtwn_write_2(sc, R92C_SYS_FUNC_EN, reg & ~R92C_SYS_FUNC_EN_CPUEN); - rtwn_write_2(sc, R92C_SYS_FUNC_EN, reg | R92C_SYS_FUNC_EN_CPUEN); + + if (reason != RTWN_FW_RESET_SHUTDOWN) { + rtwn_write_2(sc, R92C_SYS_FUNC_EN, + reg | R92C_SYS_FUNC_EN_CPUEN); + } } void