diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-09-01 20:07:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-09-01 20:07:58 +0000 |
commit | 2254e5c9e384bd29678678df916dddbb7f63f913 (patch) | |
tree | 34c1b9cef2b7ffb8cced5857878b48f3bbe134ca /sys/arch/sparc64/dev/iommu.c | |
parent | 40d348f00dc822c7c29bf791e3dc893e97b24729 (diff) |
Standardize on EFBIG in bus_dmamap_load* if caller is too greedy; I had
done this 4.5 years ago already but regressions happened; reminded by
a similar commit in NetBSD (from mrg@); ok damien@ deraadt@ jason@
Diffstat (limited to 'sys/arch/sparc64/dev/iommu.c')
-rw-r--r-- | sys/arch/sparc64/dev/iommu.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c index 8e4e735e30d..8e78f79b043 100644 --- a/sys/arch/sparc64/dev/iommu.c +++ b/sys/arch/sparc64/dev/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.42 2006/08/15 20:55:57 miod Exp $ */ +/* $OpenBSD: iommu.c,v 1.43 2006/09/01 20:07:57 miod Exp $ */ /* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */ /* @@ -699,7 +699,7 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, if (pmap_extract(pmap, a, &pa) == FALSE) { printf("iomap pmap error addr 0x%llx\n", a); iommu_iomap_clear_pages(ims); - return (E2BIG); + return (EFBIG); } err = iommu_iomap_insert_page(ims, pa); @@ -710,7 +710,7 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, err, a, pa, buf, buflen, buflen); iommu_dvmamap_print_map(t, is, map); iommu_iomap_clear_pages(ims); - return (E2BIG); + return (EFBIG); } } } @@ -761,7 +761,7 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, #endif if (iommu_iomap_load_map(is, ims, dvmaddr, flags)) - return (E2BIG); + return (EFBIG); { /* Scope */ bus_addr_t a, aend; @@ -779,7 +779,7 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, if (pmap_extract(pmap, a, &pa) == FALSE) { printf("iomap pmap error addr 0x%llx\n", a); iommu_iomap_clear_pages(ims); - return (E2BIG); + return (EFBIG); } pgstart = pa | (MAX(a, addr) & PAGE_MASK); @@ -895,7 +895,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, "pa 0x%lx\n", err, VM_PAGE_TO_PHYS(m)); iommu_dvmamap_print_map(t, is, map); iommu_iomap_clear_pages(ims); - return (E2BIG); + return (EFBIG); } } } else { @@ -918,7 +918,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, "pa 0x%llx\n", err, a); iommu_dvmamap_print_map(t, is, map); iommu_iomap_clear_pages(ims); - return (E2BIG); + return (EFBIG); } } @@ -974,7 +974,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, #endif if (iommu_iomap_load_map(is, ims, dvmaddr, flags)) - return (E2BIG); + return (EFBIG); if (segs[0]._ds_mlist) err = iommu_dvmamap_load_mlist(t, is, map, segs[0]._ds_mlist, @@ -1135,7 +1135,7 @@ iommu_dvmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa, printf("append range, out of segments\n"); iommu_dvmamap_print_map(t, NULL, map); map->dm_nsegs = 0; - return (E2BIG); + return (EFBIG); } } } |