Subject: Re: probe()
To: Kamal R Prasad <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 04/28/2003 21:43:14
On Mon, Apr 28, 2003 at 10:43:13AM +0100, Kamal R Prasad wrote:
> it looks like probe(handle_t) is called with the address of the
> corresponding (pci) card.
> my question is:- since we are not specifying which pci slot the card is
> in, how does the kernel identify the appropriate probe function to be
> called? where is the src code for this located?
I'm not sure I understand your question properly.
In most of our PCI drivers, the probe function is called xxx_match(), and
the argument isn't a handle_t (there are 3 arguments, and the one describing
the current card is a pci_attach_args).
For each PCI cards, the kernel call all the match functions, and choose the
driver which returned the hightest value.
> p.s: I wanted to send this to netbsd.help mailing list, but could not get
> the proper email id for that.
tech-kern is the right place for this.
Manuel Bouyer <firstname.lastname@example.org>
NetBSD: 24 ans d'experience feront toujours la difference