Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Only set 0x4FF in the transmit register for gigab...



details:   https://anonhg.NetBSD.org/src/rev/7dbed5e734ed
branches:  trunk
changeset: 749611:7dbed5e734ed
user:      jdc <jdc%NetBSD.org@localhost>
date:      Fri Dec 04 13:35:56 2009 +0000

description:
Only set 0x4FF in the transmit register for gigabit variants.  Set 0x100
otherwise.

diffstat:

 sys/dev/ic/gem.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r a1256ea0d372 -r 7dbed5e734ed sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c  Fri Dec 04 12:43:56 2009 +0000
+++ b/sys/dev/ic/gem.c  Fri Dec 04 13:35:56 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $ */
+/*     $NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.86 2009/12/04 11:55:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.87 2009/12/04 13:35:56 jdc Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -1161,8 +1161,9 @@
        /* Enable TX DMA */
        v = gem_ringsize(GEM_NTXDESC /*XXX*/);
        bus_space_write_4(t, h, GEM_TX_CONFIG,
-               v|GEM_TX_CONFIG_TXDMA_EN|
-               ((0x4FF<<10)&GEM_TX_CONFIG_TXFIFO_TH));
+           v | GEM_TX_CONFIG_TXDMA_EN |
+           (((sc->sc_flags & GEM_GIGABIT ? 0x4FF : 0x100) << 10) &
+           GEM_TX_CONFIG_TXFIFO_TH));
        bus_space_write_4(t, h, GEM_TX_KICK, sc->sc_txnext);
 
        /* step 10. ERX Configuration */



Home | Main Index | Thread Index | Old Index