Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2009 14:29:48 +0000 (UTC)
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197837 - head/sys/dev/bge
Message-ID:  <200910071429.n97ETmS3086922@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stas
Date: Wed Oct  7 14:29:48 2009
New Revision: 197837
URL: http://svn.freebsd.org/changeset/base/197837

Log:
  - Give a name to the host coalescing bug fix WDMA mode register bit instead
    of using hardcoded value in the code.
  Obtained from:	OpenBSD

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct  7 14:14:05 2009	(r197836)
+++ head/sys/dev/bge/if_bge.c	Wed Oct  7 14:29:48 2009	(r197837)
@@ -1789,7 +1789,7 @@ bge_blockinit(struct bge_softc *sc)
 
 	/* Enable host coalescing bug fix. */
 	if (BGE_IS_5755_PLUS(sc))
-		val |= 1 << 29;
+		val |= BGE_WDMAMODE_STATUS_TAG_FIX;
 
 	/* Turn on write DMA state machine */
 	CSR_WRITE_4(sc, BGE_WDMA_MODE, val);

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct  7 14:14:05 2009	(r197836)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct  7 14:29:48 2009	(r197837)
@@ -1431,6 +1431,7 @@
 #define	BGE_WDMAMODE_PCI_FIFOOREAD_ATTN	0x00000100
 #define	BGE_WDMAMODE_LOCREAD_TOOBIG	0x00000200
 #define	BGE_WDMAMODE_ALL_ATTNS		0x000003FC
+#define	BGE_WDMAMODE_STATUS_TAG_FIX	0x20000000
 
 /* Write DMA status register */
 #define	BGE_WDMASTAT_PCI_TGT_ABRT_ATTN	0x00000004



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910071429.n97ETmS3086922>