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/196596765e25
branches:  trunk
changeset: 360363:196596765e25
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 aaa8519336ac -r 196596765e25 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
@@ -3326,6 +3326,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++) {
@@ -3366,6 +3368,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