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 a workaround for SWSM.SMBI bit do...



details:   https://anonhg.NetBSD.org/src/rev/467e1d37b814
branches:  trunk
changeset: 335889:467e1d37b814
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jan 29 02:59:17 2015 +0000

description:
Fix a bug that a workaround for SWSM.SMBI bit doesn't work correctly.
This problem was only occured with old boot ROM on 8257[12].

XXX pullup to netbsd-[67]

diffstat:

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

diffs (27 lines):

diff -r aec08f77ac7e -r 467e1d37b814 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Jan 29 01:05:25 2015 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Jan 29 02:59:17 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.309 2015/01/16 10:36:14 ozaki-r Exp $      */
+/*     $NetBSD: if_wm.c,v 1.310 2015/01/29 02:59:17 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.309 2015/01/16 10:36:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.310 2015/01/29 02:59:17 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1844,7 +1844,7 @@
        case WM_T_82571:
        case WM_T_82572:
                reg = CSR_READ(sc, WMREG_SWSM2);
-               if ((reg & SWSM2_LOCK) != 0) {
+               if ((reg & SWSM2_LOCK) == 0) {
                        CSR_WRITE(sc, WMREG_SWSM2, reg | SWSM2_LOCK);
                        force_clear_smbi = true;
                } else



Home | Main Index | Thread Index | Old Index