From owner-freebsd-current@FreeBSD.ORG Tue Jun 10 08:51:17 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D50037B401 for ; Tue, 10 Jun 2003 08:51:17 -0700 (PDT) Received: from ion.gank.org (ion.gank.org [198.78.66.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74A4043FCB for ; Tue, 10 Jun 2003 08:51:16 -0700 (PDT) (envelope-from craig@xfoil.gank.org) Received: from localhost (ion.gank.org [198.78.66.164]) by ion.gank.org (GankMail) with ESMTP id 2FADD2BBB7 for ; Tue, 10 Jun 2003 10:51:16 -0500 (CDT) Received: from ion.gank.org ([198.78.66.164]) by localhost (ion.gank.org [198.78.66.164]) (amavisd-new, port 10024) with LMTP id 50367-05 for ; Tue, 10 Jun 2003 10:51:15 -0500 (CDT) Received: from owen1492.uf.corelab.com (pix.corelab.com [12.45.169.2]) by ion.gank.org (GankMail) with ESMTP id 774612B58F for ; Tue, 10 Jun 2003 10:51:15 -0500 (CDT) From: Craig Boston To: current@freebsd.org Content-Type: text/plain Organization: Message-Id: <1055260269.91337.127.camel@owen1492.uf.corelab.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 10 Jun 2003 10:51:10 -0500 Content-Transfer-Encoding: 7bit Subject: CardBus USB 2.0 Controller (NEC uPD) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 15:51:17 -0000 I recently purchased a generic CompUSA branded CardBus USB 2.0 controller for a challenge to try to get it to work under FreeBSD ;) It appears to use an NEC chip -- one that I've seen reports of the PCI version working -- so at least some of the support for it is already there. I'm willing to take a stab at it and would be grateful if someone can point me in the general direction of where to start. Here's the dmesg output when it's attached. cardbus1: Resource not specified in CIS: id=10, size=1000 found-> vendor=0x1033, dev=0x0035, revid=0x41 bus=3, slot=0, func=0 class=0c-03-10, hdrtype=0x00, mfdev=1 cmdreg=0x0000, statreg=0x0210, cachelnsz=8 (dwords) lattimer=0xa8 (5040 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns) intpin=a, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 ohci0: mem 0x88000000-0x88000fff irq 11 at device 0.0 on cardbus1 usb1: OHCI version 1.0 usb1: on ohci0 usb1: USB revision 1.0 uhub1: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 3 ports with 3 removable, self powered cardbus1: Resource not specified in CIS: id=10, size=1000 found-> vendor=0x1033, dev=0x0035, revid=0x41 bus=3, slot=0, func=1 class=0c-03-10, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0210, cachelnsz=8 (dwords) lattimer=0xa8 (5040 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns) intpin=b, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 ohci1: mem 0x88001000-0x88001fff irq 11 at device 0.1 on cardbus1 usb2: OHCI version 1.0 usb2: on ohci1 usb2: USB revision 1.0 uhub2: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered cardbus1: Resource not specified in CIS: id=10, size=100 found-> vendor=0x1033, dev=0x00e0, revid=0x02 bus=3, slot=0, func=2 class=0c-03-20, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0210, cachelnsz=8 (dwords) lattimer=0xa8 (5040 ns), mingnt=0x10 (4000 ns), maxlat=0x22 (8500 ns) intpin=c, irq=11 powerspec 2 supports D0 D1 D2 D3 current D0 cardbus1: at device 0.2 (no driver attached) That output seems a little funny, between the "Resource not specified in CIS" and claiming there is no driver attached right after it attaches ohci... I tried to use pccardc dumpcis, but that appears to not work with newcard. Is there an easy way to get equivalent information? Anyway, at least attaching ohci and the uhubs seems to be off to a good start. When I plug in my USB keyboard (or any other device), it doesn't attach and usbdevs -v shows this: Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), NEC(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), NEC(0x0000), rev 1.00 port 1 addr 0 should never happen! port 2 powered If I plug something in to the other port the "addr 0 should never happen!" shows up on port 1 of usb1. After about 20 seconds or so I get the message "uhub1: device problem, disabling port 1". If I pop out the card I get: cardbus1: release_all_resource: Resource still owned by child, oops. (type=1, rid=0, addr=b) cardbus1: release_all_resource: Resource still owned by child, oops. (type=3, rid=16, addr=88001000) cardbus1: release_all_resource: Resource still owned by child, oops. (type=1, rid=0, addr=b) cardbus1: release_all_resource: Resource still owned by child, oops. (type=3, rid=16, addr=88002000) If I then re-insert the card, BOOM! panic. That exact location of the panic seems to vary but it's usually somewhere in the bowels of the USB code. If anyone is really that interested, contact me off-list and I can provide traces for some of them. So, I'm not sure if I should start hacking in the Cardbus or the USB code first. My guess is that I should resolve the cardbus CIS issues first and go from there. Any hints are welcome :) Thanks, Craig