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 I added in rev. 1.273. Some old c...



details:   https://anonhg.NetBSD.org/src/rev/7f71dadde095
branches:  trunk
changeset: 331090:7f71dadde095
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jul 31 02:54:46 2014 +0000

description:
Fix a bug that I added in rev. 1.273. Some old card stopped at the attach
function with ""Please update the Bootagent" message. The code to clear the
SWSM_SMBI bit is only for 8257[1234] and 82583.

diffstat:

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

diffs (39 lines):

diff -r f69d3fb3626a -r 7f71dadde095 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Jul 31 02:37:25 2014 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Jul 31 02:54:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.283 2014/07/28 06:36:09 ozaki-r Exp $      */
+/*     $NetBSD: if_wm.c,v 1.284 2014/07/31 02:54:46 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.283 2014/07/28 06:36:09 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.284 2014/07/31 02:54:46 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1746,13 +1746,18 @@
                } else
                        force_clear_smbi = false;
                break;
+       case WM_T_82573:
+       case WM_T_82574:
+       case WM_T_82583:
+               force_clear_smbi = true;
+               break;
        default:
-               force_clear_smbi = true;
+               force_clear_smbi = false;
                break;
        }
        if (force_clear_smbi) {
                reg = CSR_READ(sc, WMREG_SWSM);
-               if ((reg & ~SWSM_SMBI) != 0)
+               if ((reg & SWSM_SMBI) != 0)
                        aprint_error_dev(sc->sc_dev,
                            "Please update the Bootagent\n");
                CSR_WRITE(sc, WMREG_SWSM, reg & ~SWSM_SMBI);



Home | Main Index | Thread Index | Old Index