From owner-cvs-all Fri Dec 20 10:47:41 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33A2237B401; Fri, 20 Dec 2002 10:47:40 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7E0243EE5; Fri, 20 Dec 2002 10:47:39 -0800 (PST) (envelope-from dillon@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gBKIldfh071134; Fri, 20 Dec 2002 10:47:39 -0800 (PST) (envelope-from dillon@repoman.freebsd.org) Received: (from dillon@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gBKIldGZ071133; Fri, 20 Dec 2002 10:47:39 -0800 (PST) Message-Id: <200212201847.gBKIldGZ071133@repoman.freebsd.org> From: Matt Dillon Date: Fri, 20 Dec 2002 10:47:39 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/usb ohci.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dillon 2002/12/20 10:47:39 PST Modified files: sys/dev/usb ohci.c Log: Fix two bugs in the DMA chaining code for OHCI. The first bug is that the dataphysend calculation could only possibly work if the virtual buffer is also physically contiguous. Calculate dataphysend by calculating the ending virtual address first, then converting to a physical address. The second bug applies only to NetBSD and OpenBSD and involves the curlen calculation in the two-contiguous-physical-pages case (which we don't support). Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic if len goes negative (meaning we lost the physical page translation representing the end of the buffer). IMHO the dataphysend is still bokered since it might be misrepresented by shared userland page mappings. The whole section needs to be rewritten to use the virtual address range. MFC after: 3 days Revision Changes Path 1.117 +9 -5 src/sys/dev/usb/ohci.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message