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 IVARs offset for 82580 and newer.



details:   https://anonhg.NetBSD.org/src/rev/fbb2d6ff1951
branches:  trunk
changeset: 340776:fbb2d6ff1951
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Sep 30 08:42:04 2015 +0000

description:
fix IVARs offset for 82580 and newer.

diffstat:

 sys/dev/pci/if_wmreg.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r dc0177765ed4 -r fbb2d6ff1951 sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h    Wed Sep 30 07:12:32 2015 +0000
+++ b/sys/dev/pci/if_wmreg.h    Wed Sep 30 08:42:04 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wmreg.h,v 1.80 2015/09/30 04:28:04 msaitoh Exp $    */
+/*     $NetBSD: if_wmreg.h,v 1.81 2015/09/30 08:42:04 knakahara Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -452,7 +452,7 @@
 #define IVAR_ALLOC_MASK  __BITS(0, 6)  /* Bit 5 and 6 are reserved */
 #define IVAR_VALID       __BIT(7)
 /* IVAR definitions for 82580 and newer */
-#define WMREG_IVAR_Q(x)        (WMREG_IVAR0 + ((x) % 2) * 4)
+#define WMREG_IVAR_Q(x)        (WMREG_IVAR0 + ((x) / 2) * 4)
 #define IVAR_TX_MASK_Q(x) (0x000000ff << (((x) % 2) == 0 ? 8 : 24))
 #define IVAR_RX_MASK_Q(x) (0x000000ff << (((x) % 2) == 0 ? 0 : 16))
 /* IVAR definitions for 82576 */



Home | Main Index | Thread Index | Old Index