Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Make IODATA WN-G150UMW work:



details:   https://anonhg.NetBSD.org/src/rev/9a2ba52ff5b2
branches:  trunk
changeset: 995307:9a2ba52ff5b2
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sat Dec 15 10:30:58 2018 +0000

description:
Make IODATA WN-G150UMW work:
- Increase delay to prevent "could not send firmware command". The value
  is taken from FreeBSD.
-Increase delay to prevent "timeout waiting for firmware readiness". The
  vaule is taken from Linux.

diffstat:

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

diffs (42 lines):

diff -r 65f021876dca -r 9a2ba52ff5b2 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sat Dec 15 09:28:27 2018 +0000
+++ b/sys/dev/usb/if_urtwn.c    Sat Dec 15 10:30:58 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_urtwn.c,v 1.65 2018/11/13 10:35:32 mlelstv Exp $    */
+/*     $NetBSD: if_urtwn.c,v 1.66 2018/12/15 10:30:58 msaitoh Exp $    */
 /*     $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $       */
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.65 2018/11/13 10:35:32 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.66 2018/12/15 10:30:58 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1035,7 +1035,7 @@
        for (ntries = 0; ntries < 100; ntries++) {
                if (!(urtwn_read_1(sc, R92C_HMETFR) & (1 << fwcur)))
                        break;
-               DELAY(10);
+               DELAY(2000);
        }
        if (ntries == 100) {
                aprint_error_dev(sc->sc_dev,
@@ -3469,12 +3469,12 @@
        if (ISSET(sc->chip, URTWN_CHIP_88E) ||
            ISSET(sc->chip, URTWN_CHIP_92EU))
                urtwn_r88e_fw_reset(sc);
-       for (ntries = 0; ntries < 1000; ntries++) {
+       for (ntries = 0; ntries < 6000; ntries++) {
                if (urtwn_read_4(sc, R92C_MCUFWDL) & R92C_MCUFWDL_WINTINI_RDY)
                        break;
                DELAY(5);
        }
-       if (ntries == 1000) {
+       if (ntries == 6000) {
                aprint_error_dev(sc->sc_dev,
                    "timeout waiting for firmware readiness\n");
                error = ETIMEDOUT;



Home | Main Index | Thread Index | Old Index