Next Previous Contents

## 3. General Setup and Kernel Module Issues

## 3.1 Kernel Module Support

All of the kernel drivers listed here are released as kernel modules; therefore, you must be sure to have a kernel which supports modules. In addition, "module version" support should be enabled to aid the use of kernels and modules which are not version matched, as described further below. If you use a kernel from a reasonably recent Linux distribution, such module support is most likely already enabled. If you're compiling the kernel yourself, then you should already be aware of how to enable modules, via the Kernel HOWTO. In any case, you can check to make sure that the following settings exist in your kernel configuration file (which is usually found under `/usr/src/linux`):

    CONFIG_MODULES=y
    CONFIG_MODVERSIONS=y

## 3.2 ISA Plug-n-Play

If you have an ISA Plug-n-Play modem, you will most likely need to use isapnptools to allocate resources to the modem card. For this, you need to have isapnptools installed and have an entry in the `/etc/isapnp.conf` file for the modem. You should read the manual pages and the Plug-and-Play-HOWTO, but if you have no other ISA devices you're concerned about, basically all you need to do is:

1. If possible, configure your BIOS to "Non-PNP OS."
2. As root, run `pnpdump` to generate a prototype isapnp.conf file based on probed cards and your system's current resource usage.
3. Look for your modem in this output, and uncomment the lines corresponding to the (otherwise unused) IRQ you wish to use for the modem. For example, Sean's `isapnp.conf` for a Thinkpad i1411 with a Lucent LT modem includes:

       (CONFIGURE ACRd119/1 (LD 0
         (INT 0 (IRQ 11 (MODE +E)))
         (IO 1 (SIZE 8) (BASE 0x0100) (CHECK))
         (NAME "ACRd119/1[0]{LT Win Modem        }")
       # (ACT Y)
       ))

   Strangely, in this case at least, it was necessary to leave the `#(ACT Y)` commented out. If it doesn't work for you one way, try it the other.
4. Copy the file to `/etc/isapnp.conf`
5. Reboot. You should see a message along the lines of 'Initializing ISA PNP devices...OK' on booting. If it fails, you have probably selected an IRQ/DMA setting which is already in use; try another of the options given in the `pnpdump` output. (Note that it is probably not necessary to reboot, if you run `isapnp` with the right flags. However, it's easiest for the beginner to simply reboot at this point.)

## 3.3 PCI Modems

If you wish to know more about your PCI modem than `cat /proc/pci` gives, utilities within the software package `pciutils` are useful, such as `scanpci` and `lspci`. In particular, `lspci -vv` gives lots of nice, useful information.

## 3.4 Module tools

The following commands are useful when dealing with modules. Many require root priveleges. See the manual pages (e.g., `man insmod`) for more detailed information on these commands.

### insmod, insmod -f, and modprobe

A version-matched kernel module should usually be inserted using the command `modprobe` module_name; `modprobe` will try to insert any other modules on which your module depends (as determined by `depmod`, described below).

A single module can be inserted (without those modules on which it depends) using the command `insmod` module_name. If the module were compiled under a different kernel than the current one, `insmod` would report the version mismatch and refuse load the module. One can, however, pass a flag to force the module to load despite the mismatch: `insmod -f` module_name. If the kernel interface the module uses did not actually change with the kernel version, the module will be inserted and could be to some degree functional.

This is the case with, for example, the ESS modem module `esscom.o` which, while compiled under 2.2.12, can be forcibly inserted with later kernels and will function to a greater or lesser extent up through kernel version 2.2.14 without further changes; beyond 2.2.15, the patch to `tty.h` described below is required. However, even forcing insertion fails for kernels from the 2.4 series.

### rmmod

A module can be unloaded (removed from the kernel) after use by issuing the command `rmmod`.

### depmod

The `depmod` commands analyzes module dependencies. The compatility of precompiled modules with a running kernel can be checked with a command like:

       depmod -e ltmodem.o

For the specific example of the ltmodem.o module compiled under kernel 2.2.12 with a running kernel 2.2.17, the returned information includes:

- depmod: *** Unresolved symbols in ltmodem.o
- depmod: bh_mask
- depmod: schedule_timeout
- depmod: request_region
- depmod: pcibios_read_co
- and many others.

Using a module with unresolved symbols can be a dangerous thing, as described below.

Next Previous Contents