Re: 1st load: PCI IRQ=9 ; 2nd load: PCI IRQ=0 !!!

Martin Mares (mj@ucw.cz)
Wed, 9 Jun 1999 10:52:42 +0200


Hello,

> I've just implemented the Cyclades-Z interrupt mode support (the board
> currently operates in Linux only in polling mode, although the HW supports
> both polling and interrupt modes; once this new patch is applied, it'll
> support both modes). Everything works fine for kernels 2.2.x, however in
> kernels 2.0.x (namely 2.0.37pre12) I have a rather weird problem.
>
> The first time the driver is called, it reads all the info from the PCI
> config. registers, including the IRQ:
>
> /* read PCI configuration area */
> pcibios_read_config_byte(cyy_bus, cyy_dev_fn,
> PCI_INTERRUPT_LINE, &cy_pci_irq);
> pcibios_read_config_dword(cyy_bus, cyy_dev_fn,
> PCI_BASE_ADDRESS_0,
> (unsigned int *) &cy_pci_addr0);
> pcibios_read_config_dword(cyy_bus, cyy_dev_fn,
> PCI_BASE_ADDRESS_1,
> (unsigned int *) &cy_pci_addr1);
> (...)
>
> Ok, the problem is the following: the first time the driver is called, it
> reads the correct IRQ and the driver registers it and works great. If I
> unload the module and reload it, the driver reads IRQ0 (zero) !!!
>
> If I reboot the system, the driver will again see the correct IRQ and it
> will work fine, until I unload / reload the module. After that, it won't
> be able to allocate the IRQ (because it doesn't see the right one) and,
> thus, it won't work.
>
> The most important point here is: IT WORKS FINE UNDER 2.2.x !!!
>
> Some more info:
>
> - After following the module load/unload/reload procedure that causes the
> problem, 'lspci -vvv' shows IRQ=0 under 2.0.x, and it shows
> IRQ=<right value> under 2.2.x;

It seems someone is rewriting the IRQ register.

Can you send me (or point me to) the exact version of the driver
this is happening with?

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"It said, "Insert disk #3," but only two will fit!"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/