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 the setting of Tx Random Backoff Register.



details:   https://anonhg.NetBSD.org/src/rev/d215403f676c
branches:  trunk
changeset: 785975:d215403f676c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Apr 08 15:55:58 2013 +0000

description:
Fix the setting of Tx Random Backoff Register.

diffstat:

 sys/dev/pci/if_bge.c    |  10 +++++-----
 sys/dev/pci/if_bgereg.h |   4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r 62f34e40b567 -r d215403f676c sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Mon Apr 08 13:56:27 2013 +0000
+++ b/sys/dev/pci/if_bge.c      Mon Apr 08 15:55:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.234 2013/04/08 03:35:11 msaitoh Exp $     */
+/*     $NetBSD: if_bge.c,v 1.235 2013/04/08 15:55:58 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.234 2013/04/08 03:35:11 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.235 2013/04/08 15:55:58 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -2813,9 +2813,9 @@
 
        /* Set random backoff seed for TX */
        CSR_WRITE_4(sc, BGE_TX_RANDOM_BACKOFF,
-           CLLADDR(ifp->if_sadl)[0] + CLLADDR(ifp->if_sadl)[1] +
-           CLLADDR(ifp->if_sadl)[2] + CLLADDR(ifp->if_sadl)[3] +
-           CLLADDR(ifp->if_sadl)[4] + CLLADDR(ifp->if_sadl)[5] +
+           (CLLADDR(ifp->if_sadl)[0] + CLLADDR(ifp->if_sadl)[1] +
+               CLLADDR(ifp->if_sadl)[2] + CLLADDR(ifp->if_sadl)[3] +
+               CLLADDR(ifp->if_sadl)[4] + CLLADDR(ifp->if_sadl)[5]) &
            BGE_TX_BACKOFF_SEED_MASK);
 
        /* Set inter-packet gap */
diff -r 62f34e40b567 -r d215403f676c sys/dev/pci/if_bgereg.h
--- a/sys/dev/pci/if_bgereg.h   Mon Apr 08 13:56:27 2013 +0000
+++ b/sys/dev/pci/if_bgereg.h   Mon Apr 08 15:55:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bgereg.h,v 1.71 2013/03/27 12:11:57 msaitoh Exp $   */
+/*     $NetBSD: if_bgereg.h,v 1.72 2013/04/08 15:55:58 msaitoh Exp $   */
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -754,7 +754,7 @@
 #define BGE_LEDCTL_BLINKPERIOD_OVERRIDE        0x80000000
 
 /* TX backoff seed register */
-#define BGE_TX_BACKOFF_SEED_MASK       0x3F
+#define BGE_TX_BACKOFF_SEED_MASK       0x3FF
 
 /* Autopoll status register */
 #define BGE_AUTOPOLLSTS_ERROR          0x00000001



Home | Main Index | Thread Index | Old Index