Propagate any alignment restriction from the parent tag to a new tag,
keeping the more restrictive of the two values. Reviewed by: cognet
This commit is contained in:
parent
3de4bbe357
commit
befb477022
@ -446,6 +446,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
||||
if (parent != NULL) {
|
||||
newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
|
||||
newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
|
||||
newtag->alignment = MAX(parent->alignment, newtag->alignment);
|
||||
newtag->flags |= parent->flags & BUS_DMA_COULD_BOUNCE;
|
||||
if (newtag->boundary == 0)
|
||||
newtag->boundary = parent->boundary;
|
||||
|
Loading…
Reference in New Issue
Block a user