Author: imp
Date: Sun Dec 8 03:49:45 2013
New Revision: 259093
URL: http://svnweb.freebsd.org/changeset/base/259093
Log:
MFC:
r246881 | ian | 2013-02-16 13:43:16 -0700 (Sat, 16 Feb 2013) | 4 lines
In _bus_dmamap_addseg(), the return value must be zero for error, or the size
actually added to the segment (possibly smaller than the requested size if
boundary crossings had to be avoided).
This fixes NFS root on Atmel platforms, and likely others.
Modified:
stable/9/sys/arm/arm/busdma_machdep.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/sys/ (props changed)
Modified: stable/9/sys/arm/arm/busdma_machdep.c
==============================================================================
--- stable/9/sys/arm/arm/busdma_machdep.c Sun Dec 8 03:02:44 2013
(r259092)
+++ stable/9/sys/arm/arm/busdma_machdep.c Sun Dec 8 03:49:45 2013
(r259093)
@@ -913,7 +913,7 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b
dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges,
curaddr);
if (dr == NULL)
- return (EINVAL);
+ return (0);
/*
* In a valid DMA range. Translate the physical
* memory address to an address in the DMA window.
@@ -935,12 +935,12 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b
segs[seg].ds_len += sgsize;
} else {
if (++seg >= dmat->nsegments)
- return (EFBIG);
+ return (0);
segs[seg].ds_addr = curaddr;
segs[seg].ds_len = sgsize;
}
*segp = seg;
- return (0);
+ return (sgsize);
}
/*
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"