lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Oct 2007 13:09:23 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	wit <is01kzh@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: about probing a device

On Wed, 10 Oct 2007 09:39:44 +0800
wit <is01kzh@...il.com> 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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ