I am using the Yocto build from meta-qcom 4.14 linux-linaro-qcom kernel. I am trying to connect an ath9k additional Wi-Fi card to the PCI bus. When I load the kernel module I get the following errors:
insmod ath9k.ko
[ 1268.218780] ath9k 0002:01:00.0: enabling device (0000 → 0002)
[ 1268.219190] ath9k 0002:01:00.0: request_irq failed
[ 1268.223863] ath9k: probe of 0002:01:00.0 failed with error -22
I have added some debug to further trace the error to the ath_pci_probe function in drivers/net/wireless/ath/ath9k/pci.c. The pdev struct passed to that function irq is 0 and appears to be uninitialized so the call to request_irq fails.
Looking at journactl it appears there is a valid IRQ for that pci port:
pcieport 0002:00:00.0: Signaling PME with IRQ 138
pcieport 0002:00:00.0: AER enabled with IRQ 138
For some reason it is not getting set and passed to ath_pci_probe.
I even went as far as hard coding it to 138 in ath_pci_probe and it appears to load and function. Is there a known bug with the PCI controller for the 4.14 kernel or is this caused by something else.