Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci PR/50527: David Binderman: Fix impossible code. ...



details:   https://anonhg.NetBSD.org/src/rev/ae1b952274b5
branches:  trunk
changeset: 812393:ae1b952274b5
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Dec 13 19:06:43 2015 +0000

description:
PR/50527: David Binderman: Fix impossible code. Odd offsets need special
treatment.

diffstat:

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

diffs (27 lines):

diff -r 221763e56bdd -r ae1b952274b5 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Sun Dec 13 18:58:13 2015 +0000
+++ b/sys/dev/pci/if_wm.c       Sun Dec 13 19:06:43 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.381 2015/10/30 19:22:01 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.382 2015/12/13 19:06:43 christos Exp $     */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.381 2015/10/30 19:22:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.382 2015/12/13 19:06:43 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3105,7 +3105,7 @@
                hash |= 1U << bit;
 
                /* XXX Hardware bug?? */
-               if (sc->sc_type == WM_T_82544 && (reg & 0xe) == 1) {
+               if (sc->sc_type == WM_T_82544 && (reg & 1) != 0) {
                        bit = CSR_READ(sc, mta_reg + ((reg - 1) << 2));
                        CSR_WRITE(sc, mta_reg + (reg << 2), hash);
                        CSR_WRITE(sc, mta_reg + ((reg - 1) << 2), bit);



Home | Main Index | Thread Index | Old Index