LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-11-2009, 08:58 AM   #1
vks_foe
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
NIC interrupt capture


Hi,
After the NIC copies the incoming data into memory, it updates the status field in the NIC descriptor and generates an interrupt for software processing. Can someone tell me how to catch this interrupt?
 
Old 09-12-2009, 01:47 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Typically NIC drivers do it and you can check the method (and the desired actions to be performed) in NIC driver code. Is it a known NIC or you're developing a driver?
 
Old 09-13-2009, 01:03 AM   #3
vks_foe
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanx for ur reply....i was trying with my own nic (realtek). Its driver file was r8169..
By the way i'm not developing any driver..

Finally what was required was .. modification of the proper function in the driver source code... and its recompilation and insertion in place of pre-existing driver.
 
Old 09-15-2009, 05:24 AM   #4
praveen24
LQ Newbie
 
Registered: Jan 2009
Posts: 13

Rep: Reputation: 0
Interrupt Catching

In the network driver responsible for interacting with your NIC registers,You will find a interrupt handler that is registered with the kernel.

request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *dev_name,
void *dev_id)


irq--->interrupt no.
irqreturn_t (*handler)(int, void *, struct pt_regs *)--->Handler routine
unsigned long flags-->flags saying whether it is shared or fast or something more,etc.
const char *dev_name-->owner of interrupts(Entry in /proc/interrupts)

void *dev_id--> If interrupts are shared then it matters.

So the main thing is that once you registered a handler in your driver code this handler will be invoked by the kernel when it receives the interrupt on that no. For better understanding google
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
control is not going to interrupt handler when interrupt remyasj LinuxQuestions.org Member Intro 1 11-12-2009 12:56 AM
control is not going to interrupt handler when interrupt comes in serial driver sateeshalla Linux - Kernel 1 05-04-2006 09:43 AM
nic couldn't map interrupt deleeuw *BSD 3 05-24-2005 11:51 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
Capture support for dvd and video capture in linux is it even going to be real ever? maximalred Linux - Distributions 3 07-06-2003 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration