Date: Mon, 9 Nov 2015 13:30:55 +0100 From: Hans Petter Selasky <hps@selasky.org> To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290610 - head/sys/x86/x86 Message-ID: <564091FF.8090605@selasky.org> In-Reply-To: <201511091219.tA9CJwe7067036@repo.freebsd.org> References: <201511091219.tA9CJwe7067036@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/09/15 13:19, Roger Pau Monné wrote: > + if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) { > + /* > + * If we have to keep the offset of each page this function > + * is not suitable, switch back to bus_dmamap_load_ma_triv > + * which is going to do the right thing in this case. > + */ > + error = bus_dmamap_load_ma_triv(dmat, map, ma, buflen, ma_offs, > + flags, segs, segp); > + return (error); > + } Hi, There has been an update made to the USB stack, which is currently the only client of "BUS_DMA_KEEP_PG_OFFSET", which means this check can probably be skipped or relaxed a bit. The condition which must be fullfilled is: #ifdef USB_DEBUG if (nseg > 1 && ((segs->ds_addr + segs->ds_len) & (USB_PAGE_SIZE - 1)) != ((segs + 1)->ds_addr & (USB_PAGE_SIZE - 1))) { /* * This check verifies there is no page offset hole * between the first and second segment. See the * BUS_DMA_KEEP_PG_OFFSET flag. */ DPRINTFN(0, "Page offset was not preserved\n"); error = 1; goto done; } #endif See: sys/dev/usb/usb_busdma.c --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?564091FF.8090605>