Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix a bug that I21[01] NVM revision >= 3.25 can'...



details:   https://anonhg.NetBSD.org/src/rev/6d07521dfc69
branches:  trunk
changeset: 339454:6d07521dfc69
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jul 23 08:29:58 2015 +0000

description:
Fix a bug that I21[01] NVM revision >= 3.25 can't be attached.
Reported by MATSUI Yoshihiro.

diffstat:

 sys/dev/pci/if_wm.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 3db12d50f8dc -r 6d07521dfc69 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Jul 23 08:24:07 2015 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Jul 23 08:29:58 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.343 2015/07/23 08:24:07 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.344 2015/07/23 08:29:58 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.343 2015/07/23 08:24:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.344 2015/07/23 08:29:58 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2120,11 +2120,9 @@
                sc->sc_flags |= WM_F_PLL_WA_I210;
        if ((sc->sc_type == WM_T_I210) && wm_nvm_get_flash_presence_i210(sc)) {
                /* NVM image release 3.25 has a workaround */
-               if ((sc->sc_nvm_ver_major > 3)
+               if ((sc->sc_nvm_ver_major < 3)
                    || ((sc->sc_nvm_ver_major == 3)
-                       && (sc->sc_nvm_ver_minor >= 25)))
-                       return;
-               else {
+                       && (sc->sc_nvm_ver_minor < 25))) {
                        aprint_verbose_dev(sc->sc_dev,
                            "ROM image version %d.%d is older than 3.25\n",
                            sc->sc_nvm_ver_major, sc->sc_nvm_ver_minor);



Home | Main Index | Thread Index | Old Index