On 2/20/06, Greg KH <greg@xxxxxxxxx> wrote: > > When I place the card into a 64-bit PCI-66 slot (not pci-x, 3.3v only), > > the driver's probe function crashes the kernel when it attempts to call > > pci_read_config_dword. > > It does? That's not good. Thanks for the reply ! > What exactly does the code look like that is causing this crash? So: foo_init() calls pci_module_init() and passes it a struct pci_driver with foo_init_one() as the 'probe' callback. I traced foo_init_one() (using printk statements), and it does pretty much the usual stuff: pci_enable_device(), pci_set_master(), pci_set_mwi(), figure out IO memory using pci_resource_start() and pci_resource_len(), set up the IRQ stuff with requst_irq()... This all seems to work fine, up until the point where pci_read_config_dword() is called. There, the system just freezes up. No panic, no crash output, just everything locks up (the caps lock light no the keyboard still toggles, but that's pretty much about it). > And, which kernel version is this happening on? It's the latest Fedora kernel -- 2.6.15-1.1831_FC4smp. > What exactly is the crash output? The single-processor version of the kernel (2.6.15-1.1831_FC4) prints some extra info before the crash: ACPI: PCI Interrupt Link [LNKF] enabled at IRQ 11 PCI: setting IRQ 11 as level-triggered Then, nothing... I know next to nothing about linux pci drivers (that's what I'm here to learn :) ), so therefore I don't know if the right thing would be for one of the functions called by the probe callback I mentioned above to just fail (before the pci_read_config() call), or if the onus is on me to figure out they're mismatched and return an error from the probe myself. Or, if detecting the mismatch explicitly in the probe would be a dirty hack to work around poorly designed hardware :) This is not software I wrote -- it's just an opportunity to teach myself how stuff works... And, trying to get it to fail gracefully, preferably with a message that tells the guys in the field that they have the wrong motherboard for use with this card (it's an Endace DAG4.3GE network monitoring probe). Thanks much for your help, Gabriel -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/