The implementation of bus_dmamap_load_ma_triv currently calls
_bus_dmamap_load_phys on each page that is part of the passed in buffer.
Since each page is treated as an individual buffer, the resulting behaviour
is different from the behaviour of _bus_dmamap_load_buffer. This breaks
certain drivers, like Xen blkfront.
To put an example, if an unmapped buffer of size 4096 that starts at offset
13 into the first page is passed to the current _bus_dmamap_load_ma
implementation (so the ma array contains two pages), the result is that two
segments are created, one with a size of 4083 and the other with size 13
(because two independant calls to _bus_dmamap_load_phys are performed, one
for each physical page). If the same is done with a mapped buffer and
calling _bus_dmamap_load_buffer the result is that only one segment is
created, with a size of 4096.
This patch removes the usage of bus_dmamap_load_ma_triv in x86 bounce buffer
code and implements _bus_dmamap_load_ma so that it's behaviour is the same
as the mapped version (_bus_dmamap_load_buffer). This patch only modifies
the x86 bounce buffer code, but IMHO it should be ported to all other arches