old-www/HOWTO/Plug-and-Play-HOWTO-1.html

192 lines
9.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE> Plug-and-Play-HOWTO: Introduction</TITLE>
<LINK HREF="Plug-and-Play-HOWTO-2.html" REL=next>
<LINK HREF="Plug-and-Play-HOWTO.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="Plug-and-Play-HOWTO-2.html">Next</A>
Previous
<A HREF="Plug-and-Play-HOWTO.html#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1.</A> <A HREF="Plug-and-Play-HOWTO.html#toc1">Introduction</A></H2>
<H2><A NAME="ss1.1">1.1</A> <A HREF="Plug-and-Play-HOWTO.html#toc1.1">1. Copyright, Trademarks, Disclaimer, &amp; Credits</A>
</H2>
<H3>Copyright</H3>
<P> Copyright (c) 1998-2007 by David S. Lawyer
<A HREF="mailto:dave@lafn.org">mailto:dave@lafn.org</A></P>
<P>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:</P>
<P>
<OL>
<LI> 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.</LI>
<LI>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.</LI>
<LI>Give due credit to previous authors and major contributors.</LI>
</OL>
</P>
<P>If you're considering making a derived work other than a
translation, it's requested that you discuss your plans with the
current maintainer.</P>
<H3>Disclaimer</H3>
<P> 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.</P>
<H3>Trademarks.</H3>
<P> 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. </P>
<H3>Credits</H3>
<P>
<UL>
<LI> March 2000: Daniel Scott proofread this and found many
typos, etc.</LI>
<LI> June 2000: Pete Barrett gave a workaround to prevent Windows
from zeroing PCI IRQs.</LI>
<LI> August 2004: Ross Boylan found typos, etc. and pointed out lack
of clarity in telling the BIOS if it's a PnP OS</LI>
</UL>
</P>
<H2><A NAME="ss1.2">1.2</A> <A HREF="Plug-and-Play-HOWTO.html#toc1.2">Future Plans; You Can Help</A>
</H2>
<P> Please let me know of any errors in facts, opinions, logic,
spelling, grammar, clarity, links, etc. But first, if the date is
over a several months old, check to see that you have the latest
version. Please send me any info that you think belongs in this
document.</P>
<P>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.</P>
<H2><A NAME="ss1.3">1.3</A> <A HREF="Plug-and-Play-HOWTO.html#toc1.3">New Versions of this HOWTO</A>
</H2>
<P> New versions of the Plug-and-Play-HOWTO should appear every year
or so and will be available to browse and/or download at LDP mirror
sites. For a list of mirror sites see:
<A HREF="http://tldp.org/mirrors.html">http://tldp.org/mirrors.html</A>. Various formats are available.
If you only want to quickly check the date of the latest version look
at:
<A HREF="http://tldp.org/HOWTO/Plug-and-Play-HOWTO.html">http://tldp.org/HOWTO/Plug-and-Play-HOWTO.html</A>. The
version you are now reading is: v1.15, August 2007 .</P>
<H2><A NAME="ss1.4">1.4</A> <A HREF="Plug-and-Play-HOWTO.html#toc1.4">New in Recent Versions</A>
</H2>
<P> For a full revision history going back to the first version see
the source file (in linuxdoc format) at
<A HREF="http://cvsview.tldp.org/index.cgi/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml">http://cvsview.tldp.org/index.cgi/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml</A></P>
<P>
<UL>
<LI>v1.15 Aug. 2007 Revised interrupt sections. Removed 2
redundant and confusing paragraphs containing a mystery function "h()"</LI>
<LI>v1.14 Feb. 2006: Revised "How Linux Does PnP"; LPC was intended to be
config. by the BIOS. Balancing IRQs. Linux can find drivers for
detected devices. </LI>
<LI>v1.13 July 2005: IRQ conflicts. Better clarity in resource
descriptions. /proc/bus. PCI configuration space accessed via IO
address space. More hardware detection tools. "Can't allocate
region" error message.</LI>
<LI>v1.12 March 2005: /dev/eth0 doesn't exist anymore. Info in /sys and
/proc changed for kernel 2.6. PCI Config. address space is
"geographic". scanpci may find a device that lspci can't. Kernel may
assign addresses at boot-time.</LI>
</UL>
</P>
<H2><A NAME="ss1.5">1.5</A> <A HREF="Plug-and-Play-HOWTO.html#toc1.5">General Introduction. Do you need this HOWTO?</A>
</H2>
<P> 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. Before PnP, many devices were automatically
searched for by non-PnP methods, but were sometimes 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 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. For
example, when you see a boot-time message from "isapnp" and it reads:
"Plug &amp; Play device" it only means an ISA Plug &amp; Play device. In
this HOWTO, PnP means PnP for both the ISA and the PCI bus.</P>
<P>As time goes by the Linux kernel is became better at supporting PnP.
In the late 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 OK.</P>
<P>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".</P>
<P>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.</P>
<P>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
<A HREF="Plug-and-Play-HOWTO-6.html#pause_">Pause</A></P>
<P>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.</P>
<P>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.</P>
<P>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.</P>
<HR>
<A HREF="Plug-and-Play-HOWTO-2.html">Next</A>
Previous
<A HREF="Plug-and-Play-HOWTO.html#toc1">Contents</A>
</BODY>
</HTML>