]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r212061,212065,212302:
authoryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 8 Oct 2010 18:43:06 +0000 (18:43 +0000)
committeryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 8 Oct 2010 18:43:06 +0000 (18:43 +0000)
commit5a7c2237289c8d40e1922f14bb1cc8894c5ee906
treead3925aa73f81847eb399b9339926039c8428ebb
parent13ab9177c617698356ee8722501bec252fa945cd
MFC r212061,212065,212302:
r212061:
  Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA
  tag. All controllers that are not BCM5755 or higher have 4GB
  boundary DMA bug. Previously bge(4) used 32bit DMA address to
  workaround the bug(r199670). However this caused the use of bounce
  buffers such that it resulted in poor performance for systems which
  have more than 4GB memory. Because bus_dma(9) honors boundary
  restriction requirement of DMA tag for dynamic buffers, having a
  separate TX/RX mbuf DMA tag will greatly reduce the possibility of
  using bounce buffers. For DMA buffers allocated with
  bus_dmamem_alloc(9), now bge(4) explicitly checks whether the
  requested memory region crossed the boundary or not.
  With this change, only the DMA buffer that crossed the boundary
  will use 32bit DMA address. Other DMA buffers are not affected as
  separate DMA tag is created for each DMA buffer.
  Even if 32bit DMA address space is used for a buffer, the chance to
  use bounce buffer is still very low as the size of buffer is small.
  This change should eliminate most usage of bounce buffers on
  systems that have more than 4GB memory.

  More correct fix would be teaching bus_dma(9) to honor boundary
  restriction for buffers created with bus_dmamem_alloc(9) but it
  seems that is not easy.

  While I'm here cleanup bge_dma_map_addr() and remove unnecessary
  member variables in bge_dmamap_arg structure.

  Tested by: marcel

r212065:
  Handle PAE case correctly. You cannot effectively specify a 4GB
  boundary in PAE case so use a 2GB boundary for PAE as suggested by
  jhb.

  Pointed out by: jhb
  Reviewed by: jhb

r212302:
  Make sure to create DMA'able memory for statistics block. This was
  missed in r212061 and it caused crashes for 570x controllers as
  controller DMAed statistics to physical address 0.

  Reported by: kan

git-svn-id: svn://svn.freebsd.org/base/stable/8@213593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/bge/if_bge.c
sys/dev/bge/if_bgereg.h