CardBus USB 2.0 Controller (NEC uPD)

From: Craig Boston <craig_at_xfoil.gank.org>
Date: 10 Jun 2003 10:51:10 -0500
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: <NEC uPD 9210 USB controller> mem 0x88000000-0x88000fff irq 11 at
device 0.0 on cardbus1
usb1: OHCI version 1.0
usb1: <NEC uPD 9210 USB controller> 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: <NEC uPD 9210 USB controller> mem 0x88001000-0x88001fff irq 11 at
device 0.1 on cardbus1
usb2: OHCI version 1.0
usb2: <NEC uPD 9210 USB controller> 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: <serial bus, USB> 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
Received on Tue Jun 10 2003 - 06:51:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:11 UTC