Subject: kern/30814: [PATCH] Add support for uhci at cardbus
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: netbsd-bugs
Date: 07/23/2005 07:16:00
>Number:         30814
>Category:       kern
>Synopsis:       [PATCH] Add support for uhci at cardbus
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 23 07:16:00 +0000 2005
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 3.99.7
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD turion64.naobsd.org 3.99.7 NetBSD 3.99.7 (TURION64) #0: Sat Jul 23 15:06:08 JST 2005 root@turion64.naobsd.org:/usr/obj/amd64/sys/arch/amd64/compile/TURION64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	Some USB host controller cardbus card uses VIA technologies chip.
	e.g.
	  http://buffalo.melcoinc.co.jp/products/catalog/item/i/ifc-cb2u2v/
	It can be handled by uhci(4) driver, but uhci at cardbus is not
	available.
>How-To-Repeat:
	Insert uhci cardbus card into cardbus slot.
>Fix:
	Patch (uhci_cardbus.diff) and uhci_cardbus.c (derived from
	uhci_pci.c) is attached.

	Apply patch and copy uhci_cardbus.c into src/sys/dev/cardbus/.
	Add below line to kernel config.

	uhci*	at cardbus? dev ? function ?	# Universal Host Controller

	This is dmesg (I have IFC-CB2U2V from BUFFALO).
  :
cbb0: wait took 0.031392s
uhci3 at cardbus0 dev 0 function 0: VIA Technologies VT83C572 USB Controller (rev. 0x61)
uhci3: interrupting at 11
usb4 at uhci3: USB revision 1.0
uhub4 at usb4
uhub4: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4: 2 ports with 2 removable, self powered
uhci4 at cardbus0 dev 0 function 1: VIA Technologies VT83C572 USB Controller (rev. 0x61)
uhci4: interrupting at 11
usb5 at uhci4: USB revision 1.0
uhub5 at usb5
uhub5: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ehci1 at cardbus0 dev 0 function 2: VIA Technologies VT8237 EHCI USB Controller (rev. 0x63)
ehci1: interrupting at 11
ehci1: EHCI version 1.0
ehci1: companion controllers, 2 ports each: uhci3 uhci4
usb6 at ehci1: USB revision 2.0
uhub6 at usb6
uhub6: VIA Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub6: 4 ports with 4 removable, self powered
  :

begin 644 uhci_cardbus.tgz
M'XL(`(7EX4(``^U:>W.;V!7??^%3G'4V6<F6];)LQTJ=!$O8IBM+7D!)/&V'
M18`L)@BT/)2XV_WN/><"`O2PW6G3G7:X,Y+@/LX]C]]Y7%`T,VS-T'US$@5U
MX[MOTIJM9O.DT_FNV6RV3H^;^5^Z/&F=MKYK-=NGS:/CT];1$?:WVLV3T^^:
MWX:=8HN"4/=QRVGD/CKOJ?'_T=;8YWX86N&%TO^!VV_P?&.?AWWH>8L'W[Z?
MA5`QJM`Z.WL-ZLR">")<>I%KZJ'MN3607*-.*P3'`;8B`-\*+']IF=1/0^K,
M#L#P3`OPU[1\&\=@ZGMS"+QI^$7W+1QU0]^>1"&.A-[VO8C4Y`$&ENOJ?@A"
M=(^F"P+/A8H3][W75WUUUPJKH(=,&-UW`J0<@HR<Z;XQ@U>@6L;,]1SO_B%E
M4[9,.XBYP-U`=TV(`N39138CW[!8S\3&C1Y@ZOGSH`9?['`&GL]^O8AM-O=,
M>VH;B79(MH7ES^V0)%OXWM(V2<29'N*7A70<Q_MBN_>D`=.F10%1H75S*^S2
M=:N^QEH`WC3EB:EUCD*CUD,=>26J^L1;TE!B0R*"S?5"V[!J.`/-X"`](I-M
MR\0K\H2;&HYNSRV?F;B]R0ANF--(R@C*:4;(W+?A!6(I$TJF9T1SRPWUU&@-
MM(>'XS[,]1#!ICM!IGAF,"*<%X,)=U1G$-;-I>6'=D!;9NMI`YQ(G5-+#R-$
M.)F=X(%\,R%2*"=L,4W@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