diff options
author | scottl <scottl@FreeBSD.org> | 2004-09-08 04:54:19 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-09-08 04:54:19 +0000 |
commit | e23092c9a97f1b039a77c6653725aa3ee0ef2053 (patch) | |
tree | b4a52ac7a4f3b9428196e77949cd5fcfe552b0ab /sys/alpha | |
parent | 143d77da28b1eae3998141ecdbf493f35562a44e (diff) | |
download | FreeBSD-src-e23092c9a97f1b039a77c6653725aa3ee0ef2053.zip FreeBSD-src-e23092c9a97f1b039a77c6653725aa3ee0ef2053.tar.gz |
Fix a problem with tag->boundary inheritence that has existed since day one
and was propagated to nearly every platform. The boundary of the child needs
to consider the boundary of the parent and pick the minimum of the two, not
the maximum. However, if either is 0 then pick the appropriate one.
This bug was exposed by a recent change to ATA, which should now be fixed by
this change. The alignment and maxsegsz tag attributes likely also need
a similar review in the near future.
This is a MT5 candidate.
Reviewed by: marcel
Submitted by: sos (in part)
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/busdma_machdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c index 4497167..0dc361c 100644 --- a/sys/alpha/alpha/busdma_machdep.c +++ b/sys/alpha/alpha/busdma_machdep.c @@ -229,11 +229,11 @@ 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); - /* - * XXX Not really correct??? Probably need to honor boundary - * all the way up the inheritence chain. - */ - newtag->boundary = MAX(parent->boundary, newtag->boundary); + if (newtag->boundary == 0) + newtag->boundary = parent->boundary; + else if (parent->boundary != 0) + newtag->boundary = MIN(parent->boundary, + newtag->boundary); if (newtag->filter == NULL) { /* * Short circuit looking at our parent directly |