Date: Sat, 8 Nov 2008 09:10:42 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 152649 for review Message-ID: <200811080910.mA89AgTZ048172@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152649 Change 152649 by hselasky@hselasky_laptop001 on 2008/11/08 09:09:50 Fix a serious BUSDMA bug: The initial virtual page offset is not retained on the bounce pages, which is what the EHCI and the OHCI expects. Affected files ... .. //depot/projects/usb/src/sys/i386/i386/busdma_machdep.c#10 edit Differences ... ==== //depot/projects/usb/src/sys/i386/i386/busdma_machdep.c#10 (text+ko) ==== @@ -938,7 +938,8 @@ if (op & BUS_DMASYNC_PREWRITE) { while (bpage != NULL) { bcopy((void *)bpage->datavaddr, - (void *)bpage->vaddr, + (void *)(bpage->vaddr + + ((vm_offset_t)(bpage->datavaddr) & PAGE_MASK)), bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } @@ -947,7 +948,8 @@ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { - bcopy((void *)bpage->vaddr, + bcopy((void *)(bpage->vaddr + + ((vm_offset_t)(bpage->datavaddr) & PAGE_MASK)), (void *)bpage->datavaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); @@ -1149,7 +1151,7 @@ bpage->datavaddr = vaddr; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); - return (bpage->busaddr); + return (bpage->busaddr + ((vm_offset_t)vaddr & PAGE_MASK)); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811080910.mA89AgTZ048172>