Re: Writing driver for a net device which does not support interrupt

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

 



Hi phil,

Thanks for your reply! I googled timer, it might be a solution except
that interval granularity is a little bit large. This device is for high
performance network. I'm not sure whether the missmatch will cause problem.

And I just figured another potential solution, to use soft interrupt to
active NAPI. I will spend some time to varify these ideas.


Thanks again!
Freeman

-------- Original Message --------
> 
> 
> On 23/03/15 10:51, Freeman Zhang wrote:
>> I'm writing a net device driver for my final project in college. But the
>> half-finished device doesn't support interrupt yet(those hardware
>> guys...)
>>
>> So I'm wondering if there is some way to poll the device for its status
>> and events.
> 
> You should take a look at kernel timers, this is a rather old resource
> and was just the first hit in a google search but it should still be
> relevant.
> 
> http://www.ibm.com/developerworks/library/l-timers-list/
> 
> Kernel timers will sort of prepare you for interrupts i.e. a kernel
> timer will fire every $time_value and you can put your code which should
> normally run during an interrupt in the callback code.
> 
> I've used kernel timers to debug interrupts on our hardware devices,
> i.e. there have been times when the hardware has stopped raising
> interrupts and I've put timers in to cover this. For example a new
> firmware might work fine, but have completely broken interrupts or not
> fire interrupts often enough and timers can prove to the hardware guys
> that it's interrupts at fault ;)
> 
> hint: you might also want to look at tasklets and have your timer
> callback just call a tasklet.
> 
> Phil

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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