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/843b2446d63c
branches:  trunk
changeset: 371616:843b2446d63c
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 5a529aa964f1 -r 843b2446d63c 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