From e1ff215426d1541cd59b3cbed781b17d1801e4d9 Mon Sep 17 00:00:00 2001
From: gferg <>
Date: Tue, 19 Aug 2003 13:42:29 +0000
Subject: [PATCH] updated
---
LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml | 2 +-
LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml | 2 +-
LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml | 526 ++++++++++++-------
3 files changed, 326 insertions(+), 204 deletions(-)
diff --git a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml
index c47b1ca3..76991173 100644
--- a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml
+++ b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml
@@ -3442,7 +3442,7 @@ nfs server attached by a Null-Modem parallel cable.
Plug-and-Play-HOWTO,
The Linux Plug-and-Play HOWTO
-Updated: September 2002.
+Updated: August 2003.
How to get your Linux system to support Plug-and-Play.
diff --git a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml
index 4b8045d1..890caa8f 100644
--- a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml
+++ b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml
@@ -1464,7 +1464,7 @@ How to install and use PCMCIA Card Services for Linux.
Plug-and-Play-HOWTO,
The Linux Plug-and-Play HOWTO
-Updated: September 2002.
+Updated: August 2003.
How to get your Linux system to support Plug-and-Play.
diff --git a/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml b/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml
index ac785bc4..b276614e 100644
--- a/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml
+++ b/LDP/howto/linuxdoc/Plug-and-Play-HOWTO.sgml
@@ -3,10 +3,12 @@
Plug-and-Play-HOWTO David S.Lawyer
- v1.06, September 2002
+ v1.07, August 2003
+
Copyright (c) 1998-2003 by David S. Lawyer
+
Please freely copy and distribute (sell or give away) this document
in any format. Send any corrections and comments to the document
@@ -67,7 +69,7 @@ provided that you:
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@linuxdoc.org.
+ (Linux Documentation Project): submit@en.tldp.org.
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.
@@ -85,9 +87,9 @@ 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) should be assumed to
-be a trademark). Such trademarks belong to their respective owners.
-
+
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
@@ -118,24 +120,27 @@ answer.
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: . Various formats are
+url="http://tldp.org/mirrors.html">. Various formats are
available. If you only want to quickly check the date of the latest
version look at: . The
-version you are now reading is: v1.06, September 2002 .
+url="http://tldp.org/HOWTO/Plug-and-Play-HOWTO.html">. The
+version you are now reading is: v1.07, August 2003 .
New in Recent Versions
-
-v1.06 September 2002: Revised about telling the BIOS if the OS is PnP
+
For a full revision history going back to the first version see
+the source file (in linuxdoc format) at .
+
+v1.07 August 2003: New M$ url, reserve resources for isa-pnp, lspci+,
+scanport may not find hdw, finding dev. and config.
+v1.06 September 2002: Revised about telling the BIOS if the OS is
+PnP
v1.05 July 2002 typos: or => of, and => an, A Allocate => Allocate,
programs => program; Dell PCs: "Plug and Play Configuration Error",
clarity on telling BIOS if your OS is PnP, "Intro to PnP" had truncated
sentence, routing IRQs on PCI clarified, Change of emphasis in entire
-doc: Linux is now a PnP OS (sort of), PCI has almost replaced ISA
-v1.04 March 2002 finding a device driver, PCI serial ports,
-v1.04 March 2002 finding a device driver, PCI serial ports,
- alias example in modules.conf, PnP needed for linmodems
-v1.03 August 2001: error messages, boot-prompt parameters
+doc: Linux is now a PnP OS (sort of), PCI has almost replaced
+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
@@ -553,17 +558,17 @@ standard PCI specifications (which are not called "PnP") provide the
equivalent of PnP for the PCI bus.
PnP matches up devices with their device drivers and specifies their
-communication channels. On the ISA bus before Plug-and-Play the
-bus-resources were formerly set in hardware devices by jumpers.
-Software drivers were assigned bus-resources by configuration files
-(or the like) or by probing the for the device at addresses where it's
-expected to reside. The PCI bus was PnP-like from the beginning but
-at first it wasn't called PnP (and often still isn't called PnP).
-While the PCI bus specifications don't use the term PnP it supports in
-hardware what today is called PnP.
+communication channels. On the ISA bus before Plug-and-Play, the
+bus-resources were formerly set in hardware devices by jumpers or
+switches. Software drivers were assigned bus-resources by
+configuration files (or the like) or by probing the for the device at
+addresses where it's expected to reside. The PCI bus was PnP-like
+from the beginning but at first it wasn't called PnP (and often still
+isn't called PnP). While the PCI bus specifications don't use the
+term PnP, it supports in hardware what today is called PnP.
How It Works (simplified)
-
Here's an oversimplified view of how PnP should work. The PnP
+
Here's how PnP should work in theory. The PnP
configuration program finds all PnP devices and asks each what
bus-resources it needs. Then it checks what bus-resources (IRQs,
etc.) it has to give away. Of course, if it has reserved
@@ -575,18 +580,30 @@ possible). It then tells each physical device what bus-resources are
assigned to it and the devices set themselves up to use only the
assigned bus-resources. Then the device drivers somehow find out what
bus-resources their devices use and are thus able to communicate
-effectively with the devices they control. In Linux all this is done
-by the BIOS and/or kernel and/or device drivers in a non-centralized
-manner.
+effectively with the devices they control.
For example, suppose a card needs one interrupt (IRQ number) and 1 MB
of shared memory. The PnP program reads this request from the card.
It then assigns the card IRQ5 and 1 MB of memory addresses space,
-starting at address 0xe9000000. It's not always this simple as the
-card (or routing table for PCI) may specify that it can only use
-certain IRQ numbers or that the 1 MB of memory must lie within a
-certain range of addresses. The details are different for the PCI and
-ISA buses with more complexity on the ISA bus.
+starting at address 0xe9000000. It then informs the device driver of
+what it's done (except the BIOS can't do this). It's not always this
+simple as the card (or routing table for PCI) may specify that it can
+only use certain IRQ numbers or that the 1 MB of memory must lie
+within a certain range of addresses. The details are different for
+the PCI and ISA buses with more complexity on the ISA bus.
+
+One way commonly used to allocate resources is to start with one
+device and allocate it bus-resources. Then do the same for the next
+device, etc. Then if finally all devices get allocated resources
+without conflicts, then all is OK. But if allocating a needed
+resource would create a conflict, then it's necessary to go back and
+try to make some changes in previous allocations so as to obtain the
+needed bus-resource. This is called rebalancing. Linux doesn't do
+rebalancing but MS Windows does in some cases. For Linux, all this is
+done by the BIOS and/or kernel and/or device drivers. In Linux the
+device driver doesn't allocate any resources until the driver starts
+up, so one way to avoid conflicts is just not to start any device that
+might cause a conflict.
There are some shortcuts that PnP software may use. One is to keep
track of how it assigned bus-resources at the last configuration (when the
@@ -601,23 +618,23 @@ originally a PnP OS but has been gradually becoming a PnP OS. PnP
originally worked in Linux because a PnP BIOS would configure the
bus-resources and the device drivers would find out (using programs
supplied by the Linux kernel) what the BIOS has done. Today, most
-drivers can issue commands to do their own configuring and don't need
-to rely on the BIOS. Unfortunately a driver might take a bus-resource
-needed by another device). Some device drivers store the last
-configuration they used and use it the next time the computer is
-powered on.
+drivers can issue commands to do their own bus-resource configuring
+and don't need to rely on the BIOS. Unfortunately a driver might take
+a bus-resource which another device will need later on. Some device
+drivers may store the last configuration they used in a configuration
+file and use it the next time the computer is powered on.
If the device hardware remembered their previous configuration, then
there wouldn't be any hardware to configure at the next boot-time, but
they seem to forget their configuration when the power is turned off.
Some devices contain a default configuration (but not necessarily the
-last one used). Thus a PnP needs to be re-configured each time the PC
-is powered on. Also, if a new device has been added, then it too
-needs to be configured. Allocating bus-resources to this new device
-might involve taking some bus-resources away from an existing device
-and assigning the existing device alternative bus-resources that it
-can use instead. At present, Linux can't allocate with this
-sophistication.
+last one used). Thus a PnP device needs to be re-configured each time
+the PC is powered on. Also, if a new device has been added, then it
+too needs to be configured. Allocating bus-resources to this new
+device might involve taking some bus-resources away from an existing
+device and assigning the existing device alternative bus-resources
+that it can use instead. At present, Linux can't allocate with this
+sophistication (and MS Windows XP may not be able to do it either).
Starting Up the PC
When the PC is first turned on the BIOS chip runs its program to
@@ -637,24 +654,25 @@ into memory from the hard-disk). If you've told the BIOS that you
have a PnP operating system (PnP OS), it should start booting the PC
as above and let the operating system finish the PnP configuring.
Otherwise, a PnP-BIOS will (prior to booting) likely try to do the
-rest of the PnP configuring of devices (but not informing their
-drivers).
+rest of the PnP configuring of devices (but not inform their
+drivers of what it did).
Buses
ISA is the old bus of the old IBM PCs while PCI is a newer and
faster bus from Intel. The PCI bus was designed for what is today
-called PnP. It makes it easy (as compared to the ISA bus) to find out
+called PnP. This makes it easy (as compared to the ISA bus) to find out
how PnP bus-resources have been assigned to hardware devices. To see
-what has happened use the commands /proc/pci or /proc/bus/pci. The
-boot-up messages on your display are useful (use shift-PageUp to back
-up thru them). See
+what's on the PCI bus type /proc/pci. The boot-up messages on your
+display show devices which have been found on various buses (use
+shift-PageUp to back up thru them). See
For the ISA bus there was a real problem with implementing PnP since no
one had PnP in mind when the ISA bus was designed and there are almost
no I/O addresses available for PnP to use for sending configuration info
-to physical device. As a result, the way PnP was shoehorned onto the
+to a physical device. As a result, the way PnP was shoehorned onto the
ISA bus is very complicated. Whole books have been written about it.
See . Among other things, it
requires that each PnP device be assigned a temporary "handle" by the
@@ -662,28 +680,31 @@ PnP program so that one may address it for PnP configuring. Assigning
these "handles" is call "isolation". See for the complex details.
-Eventually, the ISA bus should become extinct. When it does, PnP will
-be easier since it will be easy to find out how the BIOS has
-configured the hardware. There will still be the need to match up
-device drivers with devices and also a need to configure devices that
-are added when the PC is up and running.
+Eventually, the ISA bus should become extinct. When this happens, PnP
+will be a little easier since it will be easier to find out how the
+BIOS has configured the hardware. There will still be the need to
+match up device drivers with devices and also a need to configure
+devices that are added when the PC is up and running.
How Linux Does PnP