Re: ISR for shared IRQ is called again and again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/2/27 Michael Blizek <michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> On 15:00 Thu 26 Feb     , Denis Borisevich wrote:
>> 2009/2/25 Michael Blizek <michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
>> > On 17:44 Wed 25 Feb     , Denis Borisevich wrote:
> ...
>> >> === CODE ABOVE ===
>> >>
>> >> So, what do I have now. When no program touches my device (it is
>> >> idling) and the ahci driver is loaded I have this "no interrupt"
>> >> message in dmesg output 20-30 times per second. When some application
>> >> uses my device I have the proper printouts (the kind of interrupt and
>> >> so on) and bunch of these "no interrupt". When I install my board into
>> >> another PCI slot (and get another interrupt line) I never see these
>> >> "no interrupt" messages, but only the ones concerning to the actual
>> >> interrupt handling in my driver. Which indicates that driver works as
>> >> intended. The questions is why the dev_id parameter of
>> >> my_interrupt_handler() holds the data which belongs to one of the
>> >> boards controlled by my driver (which is the reason why the check in
>> >> the very beginning of ISR routine is passed)?
>> >
>> > The dev_id is the what you passed it request_irq. You do not need the loop,
>> > because you will not be called if dev_id is not your device. The 2
>> > if...goto handled should never happen. What you need to do in the interrupt
>> > handler is to ask the device if it has raised the interrupt and do the
>> > interrupt handling if necessary. Something like this:
> ...
>> I see. Thanks for your help. Have you any idea why the ahci driver
>> behaves this way?
>
> Why it raises so many interrupts when idle? I cannot tell you this. It is
> usually not very desireable to do this, because the cpu cannot enter deep
> sleep. On notebooks this means more power consumption and less battery life.

I would understand this behaviour if it was hdd controlled by the
ahci, but there's only one serial ata device in my system which is
dvd-rom (without any cd in it). So this behaviour is very-very
strange.
P.S.: Thank you for your advise about the needless loop with dev_id in
ISR. Driver works fine without it!

--
Denis

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux