Module Name: src
Committed By: knakahara
Date: Wed Sep 30 08:42:04 UTC 2015
Modified Files:
src/sys/dev/pci: if_wmreg.h
Log Message:
fix IVARs offset for 82580 and newer.
To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/pci/if_wmreg.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.80 src/sys/dev/pci/if_wmreg.h:1.81
--- src/sys/dev/pci/if_wmreg.h:1.80 Wed Sep 30 04:28:04 2015
+++ src/sys/dev/pci/if_wmreg.h Wed Sep 30 08:42:04 2015
@@ -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 @@ struct livengood_tcpip_ctxdesc {
#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 */