From owner-svn-src-head@FreeBSD.ORG Fri Jun 11 03:00:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 756A210656CB; Fri, 11 Jun 2010 03:00:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1A78FC15; Fri, 11 Jun 2010 03:00:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5B30YGB045390; Fri, 11 Jun 2010 03:00:34 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5B30X9q045387; Fri, 11 Jun 2010 03:00:33 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006110300.o5B30X9q045387@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 11 Jun 2010 03:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209026 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 03:00:35 -0000 Author: marcel Date: Fri Jun 11 03:00:32 2010 New Revision: 209026 URL: http://svn.freebsd.org/changeset/base/209026 Log: Bump MAX_BPAGES from 256 to 1024. It seems that a few drivers, bge(4) in particular, do not handle deferred DMA map load operations at all. Any error, and especially EINPROGRESS, is treated as a hard error and typically abort the current operation. The fact that the busdma code queues the load operation for when resources (i.e. bounce buffers in this particular case) are available makes this especially problematic. Bounce buffering, unlike what the PR synopsis would suggest, works fine. While on the subject, properly implement swi_vm(). PR: 147502 MFC after: 1 week Modified: head/sys/ia64/ia64/busdma_machdep.c head/sys/ia64/ia64/vm_machdep.c head/sys/ia64/include/md_var.h Modified: head/sys/ia64/ia64/busdma_machdep.c ============================================================================== --- head/sys/ia64/ia64/busdma_machdep.c Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/ia64/busdma_machdep.c Fri Jun 11 03:00:32 2010 (r209026) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define MAX_BPAGES 256 +#define MAX_BPAGES 1024 struct bus_dma_tag { bus_dma_tag_t parent; @@ -77,7 +77,7 @@ struct bounce_page { STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; +u_int busdma_swi_pending; static struct mtx bounce_lock; static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; Modified: head/sys/ia64/ia64/vm_machdep.c ============================================================================== --- head/sys/ia64/ia64/vm_machdep.c Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/ia64/vm_machdep.c Fri Jun 11 03:00:32 2010 (r209026) @@ -378,9 +378,8 @@ sf_buf_free(struct sf_buf *sf) */ void swi_vm(void *dummy) -{ -#if 0 +{ + if (busdma_swi_pending != 0) busdma_swi(); -#endif } Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/include/md_var.h Fri Jun 11 03:00:32 2010 (r209026) @@ -75,6 +75,7 @@ struct ia64_init_return { extern uint64_t ia64_lapic_addr; extern long Maxmem; +extern u_int busdma_swi_pending; void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *);