Re: de2104x: interrupts before interrupt handler is registered

From: linux-os (Dick Johnson)
Date: Tue Mar 07 2006 - 09:20:03 EST



On Tue, 7 Mar 2006, Robert Hancock wrote:

> linux-os (Dick Johnson) wrote:
>> No. It would be good if that was true. Unfortunately, the IRQ
>> returned before the pci_enable_device() is not correct. It
>> gets re-written by pci_enable_device().
>
> That wasn't what I meant, yes, that is true in the current kernel.
> However, any device which would start generating interrupts just because
> its BARs got enabled by pci_enable_device seems broken.

Thinking that a device powers ON in a stable state is naive. Many
complex devices will have FPGA devices with floating pins that don't
become stable until their contents are loaded serially. Others will
have IRQ requests based upon power-on states that need to be cleared
with a software reset. One can't issue a software reset until the
device is enabled and enabling the device may generate interrupts
with no handler in place so you have a "can't get there from here"
problem. Linux-2.4.x had IRQs that were stable. One could put
a handler in place that would handle the possible burst of interrupts
upon startup. Then this was changed so the IRQ value is wrong
until an unrelated and illogical event occurs. Now, you need to
make work-arounds that were never before necessary. My request
to fix this fell upon deaf ears.

>
> The driver needs to request the interrupt after the device is enabled,
> and only after that can it enable the device to generate interrupts.
>
> --
> Robert Hancock Saskatoon, SK, Canada
> To email, remove "nospam" from hancockr@xxxxxxxxxxxxx
> Home Page: http://www.roberthancock.com/
>

Cheers,
Dick Johnson
Penguin : Linux version 2.6.15.4 on an i686 machine (5589.50 BogoMips).
Warning : 98.36% of all statistics are fiction, book release in April.
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information, including any attachments, without reading or disclosing them.

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