Re: about probing a device

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

 



On Wed, 10 Oct 2007 09:39:44 +0800
wit <[email protected]> wrote:

> Hi,
> I found these routines in the kernel, does this means only one driver
> can be matched to a device? What if two drivers both can drive the
> device, like sd & sg in scsi subsystem?

The first one which matches and successfully attaches "wins". Thus you
can allow two drivers to match an identifier and load either one or the
other. You can also deal with cases where the same identifier is used for
two different devices (eg with the revision id distinguishing them), by
having the probe methods fail if the revision is wrong.

For things like sd/sg this isn't an issue. The hardware driver interfaces
to the scsi layer which itself provides interfaces for sd, sr, sg, ... etc

If you have a PCI device with multiple device functions on one PCI
function it can be a problem. We have some special case drivers for
serial/parallel multiport cards for exactly this reason, and some ugly
hacks in AGP and EDAC that arise from this limit.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux