Next Previous Contents

1. Introduction

1.1 1. Copyright, Trademarks, Disclaimer, & Credits

Copyright

Copyright (c) 1998-2004 by David S. Lawyer mailto:dave@lafn.org

Please freely copy and distribute (sell or give away) this document in any format. Send any corrections and comments to the document maintainer. You may create a derivative work and distribute it provided that you:

  1. If it's not a translation: Email a copy of your derivative work (in a format LDP accepts) to the author(s) and maintainer (could be the same person). If you don't get a response then email the LDP (Linux Documentation Project): submit@en.tldp.org.
  2. License the derivative work in the spirit of this license or use GPL. Include a copyright notice and at least a pointer to the license used.
  3. Give due credit to previous authors and major contributors.

If you're considering making a derived work other than a translation, it's requested that you discuss your plans with the current maintainer.

Disclaimer

While I haven't intentionally tried to mislead you, there are likely a number of errors in this document. Please let me know about them. Since this is free documentation, it should be obvious that I cannot be held legally responsible for any errors.

Trademarks.

Any brand names (starts with a capital letter such as MS Windows) should be assumed to be a trademark). Such trademarks belong to their respective owners.

Credits

1.2 Future Plans; You Can Help

Please let me know of any errors in facts, opinions, logic, spelling, grammar, clarity, links, etc. But first, if the date is over a few months old, check to see that you have the latest version. Please send me any info that you think belongs in this document.

I haven't studied the code used by various Linux drivers and the kernel to implement Plug-and-Play. But I have sampled a little of it (especially some of the comments). Thus this HOWTO is still incomplete. It needs to explain more about "hot swapping", "hot-plug" and about the new PnP software for kernel 2.6. The history of Linux PnP is not well covered. Also, it doesn't cover firewire. It likely has some inaccuracies (let me know where I'm wrong). In this HOWTO I've sometimes used ?? to indicate that I don't really know the answer.

1.3 New Versions of this HOWTO

New versions of the Plug-and-Play-HOWTO should appear every few months or so and will be available to browse and/or download at LDP mirror sites. For a list of mirror sites see: http://tldp.org/mirrors.html. Various formats are available. If you only want to quickly check the date of the latest version look at: http://tldp.org/HOWTO/Plug-and-Play-HOWTO.html. The version you are now reading is: v1.10, August 2004 .

1.4 New in Recent Versions

For a full revision history going back to the first version see the source file (in linuxdoc format) at http://www.ibiblio.org/pub/linux/docs/HOWTO/other-formats/sgml/Plug-and-Play-HOWTO.sgml.gz

v1.10 August 2004: sysfs not yet as useful as claimed, obsolete card info moved to "Historical" section. v1.09 August 2004: Edited per email from Ross Boylan (ross@biostat.ucsf.edu). Clarity re telling BIOS if it's a PnP OS. /proc/isapnp covered. Typos fixed. sysfs in kernel 2.6. v1.08 June 2004: Edited all except appendix for more clarity and to correct some obsolete statements in view of the increasing PnP abilities of Linux. Added brief info on "hot plug" and USB.
v1.07 August 2003: New M$ url, reserve resources for isa-pnp, lspci+, scanport may not find hdw, finding dev. and config. ISA

The version 1.0 (Nov. 2000) was long overdue and recognized that the kernel is doing more in helping device drivers set up PnP. Kernel 2.4 is significantly improved in this respect. There's still a lot of improvement needed in both this HOWTO and the way that Linux does PnP.

1.5 General Introduction. Do you need this HOWTO?

Plug-and-play (PnP) is a system which automatically detects devices such as disks, sound cards, ethernet cards, modems, etc. It finds all devices on the PCI bus and all devices that support PnP on the old ISA bus. Without PnP, many devices were automatically searched for by non-PnP methods, but were often not found. PnP provides a way to find all devices that support PnP. It also does some low-level configuring of them. Non-PnP devices (or PnP devices which have not been correctly PnP-configured), can often be detected by non-PnP methods. The modern PCI bus is inherently PnP while the old ISA bus originally wasn't PnP but had PnP support added to it later. So sometimes PnP is used to only mean PnP for the old ISA bus. In this HOWTO, PnP means PnP for both the ISA and the PCI bus.

As time goes by the Linux kernel is became better at supporting PnP. In the 20th century, one could say that Linux was not really a PnP OS. But the claim is made that with version 2.6 of the kernel, Linux is now fully PnP (provided the kernel is built with appropriate PnP support). While the PnP system is not centralized like it is in MS Windows (with its registry) the decentralized Linux PnP seems to work.

Linux does keep track of resource assignments requested by device drivers and refuses any request if it thinks it would cause a conflict. The kernel also provides programs that device drivers can call on to do their own plug-and-play. The kernel also reads all configuration registers of all PnP devices and maintains tables of them that device drivers can consult. This table helps drivers find their hardware. Kernel 2.6 provides better support for "hot plug".

The BIOS hardware of your PC likely does some plug-and-play work too. Thus if everything works OK PnP-wise, you can use your computer without needing to know anything about plug-and-play. But if some devices which are supported by Linux don't work (because they're not discovered or configured correctly by PnP) then you may need to read some of this HOWTO. You'll learn not only about PnP but also learn something about how communication takes place inside the computer. If you have a modern computer with a PCI bus but no ISA bus, you may skip over or skim the parts about the ISA bus.

If you're having problems with a device, watch the messages displayed at boot-time (go back thru them using Shift-PageUp). If this doesn't also display early messages from the BIOS use the "Pause" key. See Pause

Check to see that you have the right driver for a device, and that the driver is being found and used. If the driver is a module, type "lsmod" (as the root user) to see it it's loaded (in use). If it's not a module then it should be built into the kernel. There should be a file somewhere that tells what drivers are built into the kernel: (such as: /boot/config-2.4-20 in Debian). Sometimes a device name (such as /dev/eth0) doesn't get a driver assigned to it unless the assignment is found in the file: /etc/modules.conf: For example, to assign the "tulip" driver to eth0 you add a line to this file: "alias eth0 tulip".

This HOWTO doesn't cover the problem of finding and installing device drivers. Perhaps it should. One problem is that a certain brand of a card (or other physical device) may not say what kind of chips are used in it. The driver name is often the same as the chip name and not the brand name. One way to start to check on a driver is to see if it is discussed in the kernel documentation, in another HOWTO, or on the Internet. Warning: Such documentation may be out of date.

The PCI bus computers (no ISA bus) have significantly reduced the number of things that can go wrong. For the ISA bus and the lack of kernel support for ISA Pnp (before kernel 2.4), there was much more that could go wrong. Remember that sometimes problems which seem to be PnP related are actually due to defective hardware or to hardware that doesn't fully conform to PnP specs.


Next Previous Contents