O(/E)HCI detach support (was CardBus USB 2.0 Controller)

From: Craig Boston <craig_at_xfoil.gank.org>
Date: Sat, 14 Jun 2003 19:02:52 -0500
On Thursday 12 June 2003 07:15 am, Bernd Walter wrote:
> I'm not shure if the code would work, but it was also ported into ehci
> and therefor ehci should be in a similar state.
> Well loosing memory is better than panic.
> I have no cardbus - can this be tested with a module?

Well, the card no longer complains when it is removed, but unfortunately 
re-inserting it results in a panic in pci_freecfg.  At least the panic always 
seems to happen in the same place now:

#0  0xc01b2a82 in pci_freecfg (dinfo=0xc1cc8f00)
    at /mnt/compile/src/sys/dev/pci/pci.c:456
#1  0xc017f9c0 in cardbus_detach_card (cbdev=0xc0c68580)
    at /mnt/compile/src/sys/dev/cardbus/cardbus.c:238
#2  0xc017f6d8 in cardbus_attach_card (cbdev=0xc0c68580)
    at /mnt/compile/src/sys/dev/cardbus/cardbus.c:158
#3  0xc01b1658 in CARD_ATTACH_CARD (dev=0xc0c68580) at card_if.h:67
#4  0xc01af345 in cbb_insert (sc=0xc0c68580)
    at /mnt/compile/src/sys/dev/pccbb/pccbb.c:936
#5  0xc01af0d8 in cbb_event_thread (arg=0xc1bd2a00)
    at /mnt/compile/src/sys/dev/pccbb/pccbb.c:883

at the line:
pci.c:456     STAILQ_REMOVE(devlist_head, dinfo, pci_devinfo, pci_links);

I went through devlist_head list manually and didn't see dinfo in there.  
dinfo is ID 1003 0035 (NEC OHCI) and it has the other OHCI and the EHCI 
dangling off of it -- neither of which are in the actual devlist.  It looks 
like something somewhere isn't getting freed.

There is also still trouble when it's combined with other PCMCIA devices -- it 
works with 16-bit PCcard stuff if and only if it's the FIRST card inserted, 
and completely blows up if combined with another Cardbus device either way.  
Of course putting two Cardbus 3com NICs in doesn't work either, so I think 
there may be some unresolved issues with this controller.  I've got serial 
gdb setup at home now (from a Linux box, oh the horror! :) and it makes 
troubleshooting a lot easier.

It seems that the cc: list has grown a bit, if anybody is getting copied and 
couldn't care less about this please let me know :)  I'm also thinking that 
at this point hackers_at_ may be a more appropriate venue for discussion.  
Comments?

Craig
Received on Sat Jun 14 2003 - 15:02:56 UTC

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