Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2010 23:48:03 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210271 - head/sys/dev/bce
Message-ID:  <201007192348.o6JNm3Kd021543@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon Jul 19 23:48:03 2010
New Revision: 210271
URL: http://svn.freebsd.org/changeset/base/210271

Log:
  Specify BCE_RX_BUF_ALIGN alignment for RX buffers. All bce(4)
  controllers require RX buffers aligned on BCE_RX_BUF_ALIGN bytes.
  
  Reviewed by:	davidch

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcereg.h

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Mon Jul 19 23:41:45 2010	(r210270)
+++ head/sys/dev/bce/if_bce.c	Mon Jul 19 23:48:03 2010	(r210271)
@@ -3424,7 +3424,7 @@ bce_dma_alloc(device_t dev)
 	    "size = 0x%jX)\n", __FUNCTION__, (uintmax_t) max_size,
 	     max_segments, (uintmax_t) max_seg_size);
 
-	if (bus_dma_tag_create(sc->parent_tag, 1,
+	if (bus_dma_tag_create(sc->parent_tag, BCE_RX_BUF_ALIGN,
 	    BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL,
 	    max_size, max_segments, max_seg_size, 0, NULL, NULL,
 	    &sc->rx_mbuf_tag)) {

Modified: head/sys/dev/bce/if_bcereg.h
==============================================================================
--- head/sys/dev/bce/if_bcereg.h	Mon Jul 19 23:41:45 2010	(r210270)
+++ head/sys/dev/bce/if_bcereg.h	Mon Jul 19 23:48:03 2010	(r210271)
@@ -6316,6 +6316,7 @@ struct fw_info {
 
 #define BCE_DMA_ALIGN		8
 #define BCE_DMA_BOUNDARY	0
+#define BCE_RX_BUF_ALIGN	16
 
 #define BCE_MAX_CONTEXT		4
 



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