SuSE GmbH

SuSE Support Database

Title: ISA-PnP: Configuring an ISA-PnP card

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

ISA-PnP: Configuring an ISA-PnP card

Applies to

SuSE Linux: Versions since 5.1
Kernel: Versions since 2.0.32

General Overview

PnP hardware ("Plug and Play"; some people are firmly convinced that the real meaning is "Plug and Pray" ;-) is around and very popular since quite some time. The idea is to configure the system ressources needed by this device (such as the IRQ) dynamically during the system startup phase. This may be done e.g. by the operating system or its utilities or, on most modern mainboards, by the BIOS. Thus it should be possible to avoid the notorious "hardware component conflicts", since the OS or the BIOS can ensure that e.g. two devices do not use the same IRQ. Manual hardware configuration (jumpers etc.) should be a thing of the past. So far the theory...

Configuration

For ISA-PnP cards the configuration of their system ressources by the BIOS leads to the problem that the actual values for IRQs, I/O port addresses etc. for these cards are no more predictable: this holds in particular if a new card is built into the system. On the other hand, some device drivers (kernel modules) need to know these values of their devices beforehand (sometimes, the values must even be hard-coded into them).The result is that, each time a change occurs, the driver cannot communicate with the device anymore.

In addition, getting these actual values is often quite a troublesome task. Finally, *some* cards don't seem to follow the ISA-PnP specification completely, thus causing additional trouble. Therefore automatic configuration/administration of ISA-PnP card ressources by the BIOS should not be used under Linux. Deactivate it in your BIOS settings.

ATTENTION! When changing any BIOS settings, take notes of the previous configuration. You may need to restore it if some change of settings won't work.

In S.u.S.E. Linux the initialization of ISA-PnP cards is accomplished by means of the programs

The current Linux kernels (v 2.0.x) don't assign the ISA-PnP card parameters automatically. Instead, a list of all possible configurations for these cards can be generated. It is then the administrator's task to enable a particular setting. The advantage is that the actual settings during system operation are predictable and known beforehand. One could characterize this method as "software jumpering" (it is not necessary, though, to open the machine and to deal with real jumpers). The disadvantage, of course, is that manual user intervention is still necessary (like in the old days...)

The handling of ISA-PnP devices is about to change in Linux v2.2, though. So there is no need to worry too much about the present state of affairs ;-)

In the sequel we present step-by-step instructions for the configuration of ISA-PnP cards under Linux v2.0.x. Of course, you need root access to perform these steps. We heavily rely on the ISA-PnP FAQ (http://www.roestock.demon.co.uk/isapnptools/), which is a highly recommended lecture.

Generating the list of possible configurations

The central configuration file for ISA-PnP is /etc/isapnp.conf.

If the file /etc/isapnp.conf already exists, it is probably a residue of an earlier configuration run. Move it aside:

mv /etc/isapnp.conf /etc/isapnp.conf.bak.yymmdd  # timestamp recommended

Run pnpdump and direct its output into /etc/isapnp.conf. This is the list of all possible configurations for your ISA-PnP cards:

/sbin/pnpdump > /etc/isapnp.conf

Load /etc/isapnp.conf into your favourite editor (if you have no particular preference yet, we'd like to recommend joe which is simple and very easy to learn. Help key is Ctrl-k-h):

joe /etc/isapnp.conf

Background Info: pnpdump scans all ISA-PnP cards and writes all possible configurations (IRQs, I/O ports...) to stdout. The format of this output allows parsing by the program isapnp which uses the active (not-commented-out) entries for the initialization/configuration of the ISA-PnP hardware. Later this is done automatically during startup: /sbin/init.d/boot will check for the existence of /etc/isapnp.conf, and will invoke isapnp in case it exists.

Possible errors

pnpdump gives an error message like: No boards found
or some of the installed ISA-PnP cards are not found.

Possible causes:

Attention The fact that pnpdump detects the ISA-PnP cards installed in your system does not necessarily imply that these cards will be supported by Linux.

Preparations

After loading /etc/isapnp.conf into your editor in the previous step, the next step is to uncomment some lines (i.e., remove the first character #) and thus to select the settings you wish to use.

Don't be afraid to modify /etc/isapnp.conf. If anything goes wrong, just re-create the file with pnpdump as described above. If you make a mistake, the worst imaginable consequence is that the ensuing invoking of isapnp won't be able to initialize all ISA-PnP cards correctly.

If something really significantly goes wrong and the system crashes (e.g. because of a newly-introduced IRQ conflict) you always have the option to boot the S.u.S.E. Linux rescue system and delete/move away the offending file /etc/isapnp.conf. Then, boot your normal system as usual. No particular initialization of the ISA-PnP cards will take place, thus difficulties are not to be expected. Now you can try another time to create a valid /etc/isapnp.conf.

An example for /etc/isapnp.conf (stemming from a system with a sound card Creative Labs Soundblaster AWE64) is given below. Of course, the actual content depends heavily on the particular system, so don't just copy it into your own system.

How to adapt /etc/isapnp.conf. Rules for entries

pnpdump produces one or more configuration possibilities for each installed ISA-PnP card. Each entry for a particular card starts with a line of the form

# Card 1: (serial identifier ec 00 01 04 d8 9d 00 8c 0e)
and ends before the corresponding initial line for the next card.

One card may be able to offer several independent hardware functions. A sound card, for example, may contain in addition a game port, a MPU-401 unit and a synthesizer. The corresponding groups of functions constitute so-called "logical devices". These logical devices are to be considered like really independent devices. The physical implementation of a logical device may consist e.g. of a single chip which offers several functions.

Correspondingly, each entry for a particular card contains sub-sections for each logical device. Such a sub-section starts with a line of the form

(CONFIGURE CTL009d/66776 (LD 0
and ends with two lines containing
(ACT Y)
))
In the "raw" pnpdump output the line (ACT Y) is actually commented out by means of a preceding # character. Remove it. If you don't want to activate this logical device later, change Y into N.

The subsection associated with a logical device is divided into blocks which are separated by blank lines. Each block represents an alternative way of configuring this device. Correspondingly, to define a configuration exactly one of these blocks needs to be uncommented (by removing the leading # characters). More precisely, uncomment only all those lines, that contain entries in parentheses, e.g. like this one:

# (INT 0 (IRQ 5 (MODE +E)))
The rest of the lines are "real" comments and remain commented out. You should read them, though: they may contain useful Information.

For a test, the opening and closing parentheses of the uncommented lines of a block (ending with (ACT Y))) ) should balance.

ATTENTION: Since you are doing the hardware configuration yourself, it is -- as usual -- in your responsibility not to introduce conflicts by assigning ressources like IRQs, I/O port addresses and DMA channels more than once. Avoid the simultaneous use of IRQ 2 and IRQ 9: they are "the same".

Information about which ressources are already in use can be obtained by means of the commands

Note that some ressources may be in use only after the corresponding driver module has been loaded (example: floppy driver, parallel port driver). In any case, you may activate only those ressources in /etc/isapnp.conf which are not already in use by non-PnP devices.

If you are done, save /etc/isapnp.conf and leave the editor (joe command: Ctrl-k-x).

Testing /etc/isapnp.conf

Invoke isapnp:

/sbin/isapnp /etc/isapnp.conf
You'll get an output like the following:
Board 1 has Identity c6 ff ff ff ff 11 14 b2 50: TER1411 Serial No 4294967295 [checksum c6]
If you didn't commit an error, your ISA-PnP cards are now initialized. Note: This doesn't mean yet, that the card will work as desired. You only know that it has been recognized as an ISA-PnP device.

As already mentioned above, isapnp gets automatically invoked at boot time if the file /etc/isapnp.conf exists.

ISA-PnP and Modules

The possibility of initializing an ISA-PnP card with isapnp is independent of the actual support of this card by Linux. The real communication with the card is performed by the driver. On the other hand, the driver can't access the card until after the latter is initialized. Since isapnp can be invoked only after the main kernel has been loaded, it is necessary to implement all drivers for ISA-PnP cards as modules which can be loaded later.

Thus, the next logical step after installing /etc/isapnp.conf is the configuration, compilation and installation of the driver modules for the ISA-PnP cards. Most modules permit the specification of the necessary ressources by means of kernel parameters entered into /etc/lilo.conf or /etc/conf.modules (see chapter 7 in the S.u.S.E. Linux manual). Some modules, however, can be told the new ressources only by means of a complete re-compilation (at present, a notorious example is the sound module).

For multi-functional ISA-PnP cards, it often is a big problem to correctly assign the different blocks of entries in /etc/isapnp.conf to the particular functions (aka logical devices). Sometimes, "telling" descriptions precede the logical device blocks in /etc/isapnp.conf which, nevertheless, may often prove to be insufficient to do this assignment. In this case there remains nothing but resorting to trial-and-error, and it may well result sort of a real struggle to make the driver support all functions of the hardware.

/etc/isapnp.conf Example

This is an example of a working /etc/isapnp.conf for the Creative Labs SoundBlaster AWE64 sound card. Please remember that this example is not meant to be copied unadapted into your system. Additional comments are preceded by a comment character and included into square brackets, like this:
# [This is a comment]

# $Id: rb_isapnp.sdb,v 1.4 1998/06/18 19:55:52 rb Exp $
# This is free software, see the sources for details.
# This software has NO WARRANTY, use at your OWN RISK
#
# For details of this file format, see isapnp.conf(5)
#
# For latest information on isapnp and pnpdump see:
# http://www.roestock.demon.co.uk/isapnptools/
#
# Compiler flags: -DREALTIME -DNEEDSETSCHEDULER
#
# Trying port address 0203
# Board 1 has serial identifier ec 00 01 04 d8 9d 00 8c 0e

# (DEBUG)
# [These three lines identify the installed cards]
(READPORT 0x0203)
(ISOLATE)
(IDENTIFY *)

# [ Start of Configuration of the first ISA-PnP-Card ]
# Card 1: (serial identifier ec 00 01 04 d8 9d 00 8c 0e)
# CTL009d Serial No 66776 [checksum ec]
# Version 1.0, Vendor version 2.0
# ANSI string -->Creative SB AWE64 PnP<--
#
# Logical device id CTL0042
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

# [ Start of Configuration of 1st logical device of 1st card ]
(CONFIGURE CTL009d/66776 (LD 0
#     ANSI string -->Audio<--

# Multiple choice time, choose one only !
# [ Here, different configurations for the LD 0 are offered ]
# [ Each configuration is separated by a newline ]
# [ You may select but _one_ configuration for each logical device! ]
#
# [ 1st Config possibility for 1st logical device of 1st card ]
#     Start dependent functions: priority preferred
#       IRQ 5.
#             High true, edge sensitive interrupt (by default)
(INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 1.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
(DMA 0 (CHANNEL 1))
#       Next DMA channel 5.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
(DMA 1 (CHANNEL 5))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0220
#             IO base alignment 1 bytes
#             Number of IO addresses required: 16
(IO 0 (BASE 0x0220)) 
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0330
#             Maximum IO base address 0x0330
#             IO base alignment 1 bytes
#             Number of IO addresses required: 2
(IO 1 (BASE 0x0330))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0388
#             Maximum IO base address 0x0388
#             IO base alignment 1 bytes
#             Number of IO addresses required: 4
(IO 2 (BASE 0x0388))

# [ 2nd (alternative!) Config possibility for 1st logical device of 1st
# [ card. Separated by a blank line. ]
# [ Since the preceding block has been selected, nothing is to be ]
# [ done here anymore ]
#
#       Start dependent functions: priority acceptable
#       IRQ 5, 7, 9 or 10.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 0, 1 or 3.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 0 (CHANNEL 0))
#       Next DMA channel 5, 6 or 7.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 1 (CHANNEL 5))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0280
#             IO base alignment 32 bytes
#             Number of IO addresses required: 16
# (IO 0 (BASE 0x0220))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0300
#             Maximum IO base address 0x0330
#             IO base alignment 48 bytes
#             Number of IO addresses required: 2
# (IO 1 (BASE 0x0300))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0388
#             Maximum IO base address 0x0388
#             IO base alignment 1 bytes
#             Number of IO addresses required: 4
# (IO 2 (BASE 0x0388))

#       Start dependent functions: priority acceptable
#       IRQ 5, 7, 9 or 10.
# [...]
# [ .... other config possibilities for this LD deleted ... ]

#     End dependent functions
# [ The (ACT Y) line must be uncommented, otherwise the LD won't be ]
# [ initialized ]
(ACT Y)
))
#
# Logical device id CTL7002
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

# [ Start of Configuration of 2nd logical device of 1st card ]
(CONFIGURE CTL009d/66776 (LD 1
#     Compatible device id PNPb02f
#     ANSI string -->Game<--

# Multiple choice time, choose one only !

# [ 1st Config possibility for 2nd logical device of 1st card ]
#     Start dependent functions: priority preferred
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0200
#             Maximum IO base address 0x0200
#             IO base alignment 1 bytes
#             Number of IO addresses required: 8
(IO 0 (BASE 0x0200))

# [ 2nd Config possibility for 2nd logical device of 1st card ]
#       Start dependent functions: priority acceptable
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0200
#             Maximum IO base address 0x0208
#             IO base alignment 8 bytes
#             Number of IO addresses required: 8
# (IO 0 (BASE 0x0200))

#     End dependent functions
(ACT Y)
))
#
# Logical device id CTL0022
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

# [ Start of Configuration of 3rd logical device of 1st card ]
(CONFIGURE CTL009d/66776 (LD 2
#     ANSI string -->WaveTable<--

# Multiple choice time, choose one only !

# [ 1st Config possibility for 3rd logical device of 1st card ]
#     Start dependent functions: priority preferred
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0620
#             Maximum IO base address 0x0620
#             IO base alignment 1 bytes
#             Number of IO addresses required: 4
(IO 0 (BASE 0x0620))
(IO 1 (BASE 0x0a20))
(IO 2 (BASE 0x0e20))

# [...]
# [ .... other config possibilities for this LD deleted ... ]

#     End dependent functions
(ACT Y)
))

#
# Logical device id CTL2011
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
# [ Start of Configuration of 4th logical device of 1st card ]

(CONFIGURE CTL009d/66776 (LD 3
#     Compatible device id PNP0600
#     ANSI string -->IDE<--

# Multiple choice time, choose one only !

# [ 1st Config possibility for 4th logical device of 1st card ]
#     Start dependent functions: priority preferred
#       IRQ 10.
#             High true, edge sensitive interrupt (by default)
(INT 0 (IRQ 10 (MODE +E)))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0168
#             Maximum IO base address 0x0168
#             IO base alignment 1 bytes
#             Number of IO addresses required: 8
(IO 0 (BASE 0x0168))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x036e
#             Maximum IO base address 0x036e
#             IO base alignment 1 bytes
#             Number of IO addresses required: 2
(IO 1 (BASE 0x036e))

# [ 2nd Config possibility for 4th logical device of 1st card ]
#       Start dependent functions: priority acceptable
#       IRQ 11.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 11 (MODE +E)))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x01e8
#             Maximum IO base address 0x01e8
#             IO base alignment 1 bytes
#             Number of IO addresses required: 8
# (IO 0 (BASE 0x01e8))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x03ee
#             Maximum IO base address 0x03ee
#             IO base alignment 1 bytes
#             Number of IO addresses required: 2
# (IO 1 (BASE 0x03ee))

#       Start dependent functions: priority acceptable
#       IRQ 10, 11, 12 or 15.
# [...]
# [ .... other config possibilities for this LD deleted ... ]

#     End dependent functions
(ACT Y)
))
# End tag... Checksum 0x00 (OK)

# Returns all cards to the "Wait for Key" state
(WAITFORKEY)

Troubleshooting

----------

See also:

----------

Keywords: ISAPNP, PLUG, PLAY, SOUND

----------

Categories: Hardware , Hardware , Sound

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-rb_isapnp, Copyright SuSE GmbH, Nuremberg, Germany - Version: 05. Jun 1998
SuSE GmbH - Last generated: 07. Oct 1999 17:58:27 by maddin with sdb_gen 1.00.0