non aligned DMA transfer attempted

Matthew Dillon dillon at apollo.backplane.com
Sat Sep 5 07:12:00 UTC 2009


:> 
:>     By the way Scott, do you honestly believe that idiotic one-line
:>     answers just as a means to try to screw over my postings are
:>     appropriate for someone of your standing in the FreeBSD community?
:
:His answer is short, but correct, because all ATA drivers do use BUSDMA.
:And as I have already said, BUSDMA manages proper alignment there, by
:implementing bounce buffers.
:
:-- 
:Alexander Motin

    Perhaps, but it is hardly a civilized conversation.  If he is going to
    act like an asshole on the lists, then he can stew in his own juices
    for all I care, or not post at all.  But acting in such an infantile
    manner is something I will not tolerate.  I really don't care if he
    maps me out of his mail server or not, but playing the 'last word'
    game is something only a 5-year-old would do and he's a lot older
    then 5 years old.

    I do see the FBsd ATA driver is using busdma, so I was incorrect there.
    It is also preallocating bounce buffers on a per-slot basis, so
    you shouldn't get allocation failures later on at load-time (though
    it's a bit unclear if the bounce zone limitations can cause a later
    bus dma load to fail if insufficient bounce buffers are available,
    and allocating bounce buffers per slot can lead to a large multiplication
    of wired memory reserved).  I guess it will work even if it isn't pretty.

    I think there was another issue with ATAPI transfers... something
    related to the DMA having to be in multiples of 16 bytes (on older
    chipsets anyway), but SCSI has no such restriction so pass-through
    commands would not always be properly encapsulated into an ATAPI
    transfer.  I can't find a code reference for it but I remember
    there being some sort of related issue.

    In anycase, the bounce zone mess was why I eventually started doing
    at least a minimal alignment closer to the user<->kernel interface,
    where the kernel could safely allocated memory M_WAITOK.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>



More information about the freebsd-current mailing list