Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 11:55:07 -0600
From:      Scott Long <scottl@samsco.org>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>
Subject:   Re: svn commit: r209026 - in head/sys/ia64: ia64 include
Message-ID:  <648FCAFD-6264-4613-BBCB-F813A7C0A849@samsco.org>
In-Reply-To: <F75A7E4F-39E5-4FF4-A3A9-9A791E6C5857@mac.com>
References:  <201006110300.o5B30X9q045387@svn.freebsd.org> <201006110751.40735.jhb@freebsd.org> <853068F6-D736-4DA3-859F-D946D096843D@samsco.org> <19B0DF11-5998-40F5-8095-8D2521B1C597@mac.com> <EE4B5C07-194D-4408-B0A1-BA25BE39468F@samsco.org> <291D17F7-F387-4A13-8ED9-2898A9F7E018@mac.com> <028BA7D4-90C8-4D2D-B9A5-C1C3CF9B6D7D@samsco.org> <53158C9B-C9E1-4C47-B361-83C76181721A@mac.com> <896621F6-4BAF-43D4-9D97-29B4EF34C080@samsco.org> <F75A7E4F-39E5-4FF4-A3A9-9A791E6C5857@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 11, 2010, at 11:53 AM, Marcel Moolenaar wrote:
>=20
> On Jun 11, 2010, at 10:47 AM, Scott Long wrote:
>=20
>> On Jun 11, 2010, at 11:44 AM, Marcel Moolenaar wrote:
>>>=20
>>> On Jun 11, 2010, at 10:37 AM, Scott Long wrote:
>>>>=20
>>>> I'm not clear why you even need bounce buffers for RX.  The chip =
supports 64bit addresses with no boundary or alignment restrictions.
>>>=20
>>> As per:
>>>      /*
>>>       * All controllers that are not 5755 or higher have 4GB
>>>       * boundary DMA bug.
>>>       * Whenever an address crosses a multiple of the 4GB boundary
>>>       * (including 4GB, 8Gb, 12Gb, etc.) and makes the transition
>>>       * from 0xX_FFFF_FFFF to 0x(X+1)_0000_0000 an internal DMA
>>>       * state machine will lockup and cause the device to hang.
>>>       */
>>>      if (BGE_IS_5755_PLUS(sc) =3D=3D 0)
>>>              sc->bge_flags |=3D BGE_FLAG_4G_BNDRY_BUG;
>>>=20
>>> and:
>>>      lowaddr =3D BUS_SPACE_MAXADDR;
>>>      if ((sc->bge_flags & BGE_FLAG_40BIT_BUG) !=3D 0)
>>>              lowaddr =3D BGE_DMA_MAXADDR;
>>>      if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) !=3D 0)
>>>              lowaddr =3D BUS_SPACE_MAXADDR_32BIT;
>>>      /*
>>>       * Allocate the parent bus DMA tag appropriate for PCI.
>>>       */
>>>      error =3D bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev),
>>>          1, 0, lowaddr, BUS_SPACE_MAXADDR, NULL,
>>>          NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT,
>>>          0, NULL, NULL, &sc->bge_cdata.bge_parent_tag);
>>>=20
>>>=20
>>=20
>> Noted in previous email.  If this restriction is put in the boundary =
attribute, then you'll only bounce the very rare case of an mbuf =
straddling a 4G boundary.
>=20
> I agree with you, but I was just giving the facts. I don't even
> know if we attempted to use the boundary argument before but
> problems forced us to resort to this.
>=20

Thanks to the design limitation of PCIe, the 4GB boundary is a common =
restriction and should work fine in FreeBSD.

Scott





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?648FCAFD-6264-4613-BBCB-F813A7C0A849>