Module Name:    src
Committed By:   tsutsui
Date:           Sun Mar 20 17:54:03 UTC 2011

Modified Files:
        src/sys/conf: files
        src/sys/dev/usb: files.usb

Log Message:
Add usb_dma attribute for DMA capable USB host controllers
and specify that usb_dma attribute to dev/usb/usb_mem.c.

usb_mem.c uses bus_dma(9) for DMA memory allocation,
but non-DMA capable USB host controllers like slhci(4)
doesn't need them at all, and some ports don't bother to
prepare MD bus_dma(9) implementation (yet).

Discussed on current-users
 http://mail-index.NetBSD.org/current-users/2011/03/13/msg015995.html
and usb_dma attribute is suggested by bouyer@.
Tested by kiyohara@ on mmeye with slhci at pcmcia.


To generate a diff of this commit:
cvs rdiff -u -r1.1004 -r1.1005 src/sys/conf/files
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/usb/files.usb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1004 src/sys/conf/files:1.1005
--- src/sys/conf/files:1.1004	Sun Mar  6 17:08:35 2011
+++ src/sys/conf/files	Sun Mar 20 17:54:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1004 2011/03/06 17:08:35 bouyer Exp $
+#	$NetBSD: files,v 1.1005 2011/03/20 17:54:02 tsutsui Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1117,7 +1117,7 @@
 
 # STI (hp graphics)
 device	sti: wsemuldisplaydev
-file	dev/ic/sti.c		sti & (sti_pci | sti_gedoens)
+file	dev/ic/sti.c		sti
 
 include "dev/wscons/files.wscons"
 include "dev/rasops/files.rasops"
@@ -1153,17 +1153,19 @@
 define	usbroothub
 file	dev/usb/usbroothub_subr.c	usbroothub
 
-device	uhci: usbus, usbroothub
+define	usb_dma
+
+device	uhci: usbus, usbroothub, usb_dma
 file	dev/usb/uhci.c			uhci			needs-flag
 
 # OHCI USB controller
 #
-device	ohci: usbus, usbroothub
+device	ohci: usbus, usbroothub, usb_dma
 file	dev/usb/ohci.c			ohci			needs-flag
 
 # EHCI USB controller
 #
-device	ehci: usbus, usbroothub
+device	ehci: usbus, usbroothub, usb_dma
 file	dev/usb/ehci.c			ehci			needs-flag
 
 # SL811HS/T USB controller

Index: src/sys/dev/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.104 src/sys/dev/usb/files.usb:1.105
--- src/sys/dev/usb/files.usb:1.104	Mon Dec 27 20:42:51 2010
+++ src/sys/dev/usb/files.usb	Sun Mar 20 17:54:03 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.104 2010/12/27 20:42:51 jmcneill Exp $
+#	$NetBSD: files.usb,v 1.105 2011/03/20 17:54:03 tsutsui Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -20,7 +20,7 @@
 file	dev/usb/usb.c			usb			needs-flag
 file	dev/usb/usbdi.c			usb
 file	dev/usb/usbdi_util.c		usb
-file	dev/usb/usb_mem.c		usb
+file	dev/usb/usb_mem.c		usb & usb_dma
 file	dev/usb/usb_subr.c		usb
 file	dev/usb/usb_quirks.c		usb
 file	dev/usb/usb_verbose.c		usb & usbverbose

Reply via email to