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 Use DELAY() unitl fimware is ready.



details:   https://anonhg.NetBSD.org/src-all/rev/baf7bb0b3a92
branches:  trunk
changeset: 377092:baf7bb0b3a92
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Fri Apr 08 14:23:39 2022 +1000

description:
Use DELAY() unitl fimware is ready.

There is still a generic issue with timeouts/kpause.

diffstat:

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

diffs (13 lines):

diff -r b593689d8890 -r baf7bb0b3a92 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Fri Apr 08 14:22:04 2022 +1000
+++ b/sys/dev/usb/if_urtwn.c    Fri Apr 08 14:23:39 2022 +1000
@@ -4731,7 +4731,8 @@ static void
 urtwn_delay_ms(struct urtwn_softc *sc, int ms)
 {
 
-       if (sc->sc_uw.uw_udev == NULL)
+       if (sc->sc_uw.uw_udev == NULL || 
+           !ISSET(sc->sc_uw.uw_flags, URTWN_FLAG_FWREADY))
                DELAY(ms * 1000);
        else
                usbd_delay_ms(sc->sc_uw.uw_udev, ms);



Home | Main Index | Thread Index | Old Index