Maximilian
Maximilian

Reputation: 175

The correct way to initialize PCI device manually

A Linux kernel PCI device driver would usually call pci_register_driver() and get a callback via ->probe(). In this callback we would use pci_enable_device(), pci_set_master() and finally request_irq().

I have noticed when I manually perform these calls without pci_register_driver(), instead using pci_get_device() to get the device handle, that the IRQ is set to 0. As a result request_irq(dev->irq) fails (for obvious reason) and the driver cannot proceed with the initialization.

What step am I missing to correctly enable the IRQs for a PCI device manually?

Upvotes: 1

Views: 166

Answers (0)

Related Questions