Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Reset firmware counter when device is reset.
details: https://anonhg.NetBSD.org/src-all/rev/16f524acd545
branches: trunk
changeset: 371093:16f524acd545
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Fri Jan 07 00:52:46 2022 +1100
description:
Reset firmware counter when device is reset.
diffstat:
sys/dev/usb/if_urtwn.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 74e99a9da4c9 -r 16f524acd545 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Fri Jan 07 00:49:26 2022 +1100
+++ b/sys/dev/usb/if_urtwn.c Fri Jan 07 00:52:46 2022 +1100
@@ -3327,6 +3327,8 @@
/* Tell 8051 to reset itself. */
urtwn_write_1(sc, R92C_HMETFR + 3, 0x20);
+ /* Init firmware commands ring. */
+ sc->fwcur = 0;
/* Wait until 8051 resets by itself. */
for (ntries = 0; ntries < 100; ntries++) {
@@ -3367,6 +3369,8 @@
reg = urtwn_read_2(sc, R92C_RSV_CTRL) | R92E_RSV_MIO_EN;
urtwn_write_2(sc,R92C_RSV_CTRL, reg);
}
+ /* Init firmware commands ring. */
+ sc->fwcur = 0;
urtwn_delay_ms(sc, 10);
}
Home |
Main Index |
Thread Index |
Old Index