Re: few questions on 'struct net_device'

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

 



Hello, Rajat!
You wrote to "Roman Mashak" <mrv@xxxxxxxxxxxxx> on Wed, 31 Jan 2007 13:30:32 +0530:

RJ> Yes you are right about the firware. Lets talk about IRQ. The firmware
RJ> only finds out which irq lines a device can use and sets in its config
RJ> space, an IRQ number that this device will use i.e. the IRQ that the
RJ> device should generate when it wants to interrupt the CPU.

Thank you very much, it's much clear now. I have one more question about the other hardware relevant fields in 'struct net_device': 'base_addr' and '[r]mem_start/end'. Why is 'base_addr' recommended to be assigned during device probe, and not later when we can be sure we do need this resource?

And I didn't notice '8139too' driver uses '[r]mem_start', '[r]mem_end', isn't it mandatory?

RJ> So, from device's perspective it is set which IRQ should it generate,
RJ> but the kernel is yet not aware of it. In fact, the kernel only
RJ> allocates this IRQ to this device (or rather hooks the ISR to this IRQ
RJ> number) when you call request_irq().

RJ> In a scenario where the IRQs are not shared, that IRQ could be used by
RJ> another device till your device needs it. And hence the need for delay
RJ> in IRQ allocation from kernel's perspecive.

---
Best regards, Roman Mashak


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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