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 Add more delay in a few places. Yet anoth...



details:   https://anonhg.NetBSD.org/src-all/rev/1c84031ac311
branches:  trunk
changeset: 1026033:1c84031ac311
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sat Jun 20 08:31:19 2020 +1000

description:
Add more delay in a few places.  Yet another attempt to address the
usb transfer issues.

diffstat:

 sys/dev/usb/if_urtwn.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (43 lines):

diff -r 525c0fe564d0 -r 1c84031ac311 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sat Jun 20 08:30:12 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Sat Jun 20 08:31:19 2020 +1000
@@ -1909,6 +1909,7 @@
                }
                sc->ledlink = on;       /* Save LED state. */
        }
+       urtwn_delay_ms(sc, 1);
 }
 
 static void
@@ -2453,6 +2454,7 @@
                        reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(0));
                        reg = RW(reg, R92C_OFDM0_AGCCORE1_GAIN, 0x20);
                        urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), reg);
+                       urtwn_delay_ms(sc, 1);
 
                        if (!ISSET(sc->chip, URTWN_CHIP_88E)) {
                                reg = urtwn_bb_read(sc, R92C_OFDM0_AGCCORE1(1));
@@ -4199,6 +4201,7 @@
        /* Force 8051 reset. */
        urtwn_write_2(sc, R92C_SYS_FUNC_EN,
            urtwn_read_2(sc, R92C_SYS_FUNC_EN) & ~R92C_SYS_FUNC_EN_CPUEN);
+       urtwn_delay_ms(sc, 10);
 }
 
 static void
@@ -5270,12 +5273,15 @@
                chan -= 2;
        }
 
+       urtwn_delay_ms(sc, 1);
+
        /* Set Tx power for this new channel. */
        urtwn_set_txpower(sc, chan, ht40m);
 
        for (i = 0; i < sc->nrxchains; i++) {
                urtwn_rf_write(sc, i, R92C_RF_CHNLBW,
                    RW(sc->rf_chnlbw[i], R92C_RF_CHNLBW_CHNL, chan));
+               urtwn_delay_ms(sc, 1);
        }
 
        if (ht40m) {



Home | Main Index | Thread Index | Old Index