Git init
[framework/system/pciutils.git] / pcimodules.man
1 .TH pcimodules 8 "@TODAY@" "@VERSION@" "Linux PCI Utilities"
2 .IX pcimodules
3 .SH NAME
4 pcimodules \- List kernel driver modules available for all currently plugged
5 in PCI devices
6 .SH SYNOPSIS
7 .B pcimodules
8 .RB [ --class class_id ]
9 .RB [ --classmask mask ]
10 .RB [ --help ]
11 .SH DESCRIPTION
12 .B pcimodules
13 lists all driver modules for all currently plugged in PCI devices.
14 .B pcimodules
15 should be run at boot time, and whenever a PCI device is "hot plugged"
16 into the system.  This can be done by the following Bourne shell syntax:
17 .IP
18         for module in $(pcimodules) ; do
19 .IP
20                 modprobe -s -k "$module"
21 .IP
22         done
23 .PP
24 When a PCI device is removed from the system, the Linux kernel will
25 decrement a usage count on PCI driver module.  If this count drops
26 to zero (i.e., there are no PCI drivers), then the
27 .B modprobe -r
28 process that is normally configured to run from cron every few minutes
29 will eventually remove the unneeded module.
30 .PP
31 The --class and --classmask arguments can be used to limit the search
32 to certain classes of PCI devices.  This is useful, for example, to
33 generate a list of ethernet card drivers to be loaded when the kernel
34 has indicated that it is trying to resolve an unknown network interface.
35 .PP
36 Modules are listed in the order in which the PCI devices are physically
37 arranged so that the computer owner can arrange things like having scsi
38 device 0 be on a controller that is not alphabetically the first scsi
39 controller.
40 .SH OPTIONS
41 .TP
42 .B --class class --classmask mask
43 .PP
44 --class and --classmask limit the search to PCI
45 cards in particular classes.  These arguments are always used together.
46 The arguments to --class and --classmask
47 can be given as hexadecimal numbers by prefixing a leading "0x".
48 Note that the classes used by pcimodules are in "Linux" format,
49 meaning the class value that you see with lspci would be shifted
50 left eight bits, with the new low eight bits programming interface ID.
51 An examples of how to use class and classmask is provided below.
52 .B --help, -h
53 Print a help message and exit.
54 .SH EXAMPLES
55 .TP
56 pcimodules
57 lists all modules corresponding to currently plugged in PCI devices.
58 .TP
59 pcimodules --class 0x20000 --classmask 0xffff00
60 lists all modules corresponding to currently plugged in ethernet PCI devices.
61 .SH FILES
62 .TP
63 .B /lib/modules/<kernel-version>/modules.pcimap
64 This file is automatically generated by
65 .B depmod,
66 and used by
67 .B pcimodules
68 to determine which modules correspond to which PCI ID's.
69 .TP
70 .B /proc/bus/pci
71 An interface to PCI bus configuration space provided by the post-2.1.82 Linux
72 kernels. Contains per-bus subdirectories with per-card config space files and a
73 .I devices
74 file containing a list of all PCI devices.
75
76 .SH SEE ALSO
77 .BR lspci (8)
78
79 .SH MAINTAINER
80 The Linux PCI Utilities are maintained by Martin Mares <mj@suse.cz>.
81
82 .SH AUTHOR
83 .B pcimodules
84 was written by Adam J. Richter <adam@yggdrasil.com>, based on public
85 domain example code by Martin Mares <mj@suse.cz>.
86
87 .SH COPYRIGHT
88 .B pcimodules
89 is copyright 2000, Yggdrasil Computing, Incorporated, and may
90 be copied under the terms and conditions of version 2 of the GNU
91 General Public License as published by the Free Software Foundation
92 (Cambridge, Massachusetts, United States of America).