Short HOWTO on CardBus

There seems to be little real info on how to do stuff with CardBus. Having dug around to get a card to work, here is what I found. There may be other ways to do this.

Q. How does Cardbus work in the 2.6 series kernels?
A. The cards are detected as part of the PCI subsystem and then hotplug manages them.

Q. cardinfo/cardctl no longer see the card as there
A. Yes. But if you notice it does get an IRQ assigned. The pcmcia tools no longer see cardbus cards.

Q. So how do I get a driver loaded
A. You can load it manually - if you know which one you need. Just modprobe it and because the card looks like a PCI device it all just works.

Q. How do I get a driver to autoload
A. The old method of mucking around in the pcmcia directory doesn't work. You actually need to add some magic in the driver source file that gets pulled out when modules are compiled and ends up in /lib/modules//modules.pcimap. The magic stuff you need to add is a line like

	MODULE_DEVICE_TABLE(pci, advansys_pci_tbl);
and this needs to refer to a table like
	static struct pci_device_id advansys_pci_tbl[] = {
	        {
	                .vendor         = 0x10cd,
	                .device         = 0x1300,
	                .subvendor      = 0x1195,
	                .subdevice      = 0x1320,
	        },
	        { }             /* Terminating entry */
	};

Q. Where do those magic numbers come from?
A. They are shown from

	lspci -vn