This is a discussion on Re: (FWD) Serious busdma bug in -current in relation to USB harware. - FreeBSD ; On Saturday 08 November 2008, Alexander Motin wrote: > Hans Petter Selasky wrote: > > http://perforce.freebsd.org/chv.cgi?CH=152649 > > > > Change 152649 by hselasky@hselasky_laptop001 on 2008/11/08 09:09:50 > > > > > > Fix a serious BUSDMA bug: The initial ...
On Saturday 08 November 2008, Alexander Motin wrote:
> Hans Petter Selasky wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=152649
> >
> > Change 152649 by hselasky@hselasky_laptop001 on 2008/11/08 09:09:50
> >
> >
> > Fix a serious BUSDMA bug: The initial virtual page offset is
> > not retained on the bounce pages, which is what the EHCI and
> > the OHCI expects.
>
> I'm sorry, but are you sure with this? If bounce page will have the same
> page offset as original data, then how bus_dma_tag_create()'s alignment
> parameter expected to work? What if data are misaligned, but hardware
> require alignment?
Hi,
I'm not saying that my patch is fully correct for all cases, but at least it
solves the USB case. USB uses an alignment of 1-byte for data.
Probably someone needs to sit down a think this through. Like it is now, it is
very scary with regard to USB!
Maybe it is time to create a new busdma tag flag? BUS_DMA_NOREALIGN?
If this flag is set, busdma should refuse to load the memory if the memory is
not aligned already to the given aligment in the DMA tag ?
--HPS
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/lis...reebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"