RE: doubts on device probing(auto-detection)

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

 



Hi,

> 1. When we probe a device, how does it find out that the device
> actually exists and is functional? 

The driver does not do it. The bus that your devices is plugged into does this for you.

> 2. Do we probe for interrupts to check which interrupt line(s) can be
> assigned to the device in question? 

No, you probe to find out which interrupts line HAS (ALREADY) BEEN assigned to your device. But please note, that for modern devices there are better ways using which you get to know this.

> 3. When the driver is calling probe_irq_on, it returns a bit mask of
> unassigned interrupts. In such case driver assigns an interrupt line
> for that specific device, Am I right?  

No, the driver does not assign, but merely LEARNS which interrupt line is being used by the device. 

> 4. If so, then how does the driver decide which interrupt line to
> assign to the device? 

See above.

> 5. Once the driver assigns the interrupt line, why does the
> programmer need to explicity enable the interrupt for that device.
> Shouldn't that be done by probe_irq_on as default?  
> 6. Why do we say that the programmer must be careful to enable
> interrupts on the device after the call to the above function and
> disable them before the probe_irq_off?  

The device is expected to generate one or more interrupts between probe_irq_on() and probe_irq_off(), and hence you need this.

Thanks,

Rajat

--
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