interrupt handling by C code -
i trying disable interrupts through c code stuck @ request_irq()
. 1 argument request_irq()
flag , sa_interrupt
flag deprecated. can tell me alternative sa_interrupt
?. using kernel version 3.8.
any other alternative request_irq()
disabling interrupts?
request_irq() not "disable" interrupt. called driver wants attach interrupt service routine irq. flag irqf_shared if interrupt shared or 0 otherwise.
here example driver realtek 8169 pcie network adapter: http://lxr.free-electrons.com/source/drivers/net/ethernet/realtek/r8169.c
retval = request_irq(pdev->irq, rtl8169_interrupt, (tp->features & rtl_feature_msi) ? 0 : irqf_shared, dev->name, dev);
in example above, rtl8169_interrupt
interrupt service routine (isr) invoked each time irq raised.
it job of isr find out if interrupt indeed fired "owned" device (relevant shared interrupts) if device indeed fired interrupt, isr reads interrupt status clears interrupt.
Comments
Post a Comment