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/5073b21aa061
branches:  trunk
changeset: 942242:5073b21aa061
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 bfc82b3fc9a3 -r 5073b21aa061 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
@@ -1904,6 +1904,7 @@
                }
                sc->ledlink = on;       /* Save LED state. */
        }
+       urtwn_delay_ms(sc, 1);
 }
 
 static void
@@ -2448,6 +2449,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));
@@ -4169,6 +4171,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
@@ -5240,12 +5243,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