-----Original Message-----
From: Greg KH [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 20, 2007 1:42 PM
To: Rajendra Stalekar
Cc: [email protected]
Subject: Re: doubts on device probing(auto-detection)

On Fri, Jul 20, 2007 at 11:42:19AM +0530, Rajendra Stalekar wrote:
> Hi,
> 
> 1. When we probe a device, how does it find out that the device actually
> exists and is functional?

What type of device?  ISA?  PCI?  USB?  Firewire?  Something else?

They all work differently depending on the bus type.

Rajendra:- PCI would be a good example I suppose.

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

USB devices don't have interrupts, so you are going to have to be more
specific here :)

> 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 modern driver should ever call that function.

Rajendra:- Is it because the devices are intelligent enough so that they
announce the IRQ?

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

It uses the irq number that was assigned to it by the core already.

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

Again, don't use that old function.

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

Why are you calling it?  :)

thanks,

greg k-h



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to