Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed a PCI card with two serial and one parallel port on it. the chipset is MCS9865. I downloaded the latest driver(V1.0.12) from here. I ran make and make install. now the two serial ports are /dev/ttyD0 and /dev/ttyD1. I have tested them with picocom and it is working perfectly. the problem is that when I reboot the system there is no /dev/ttyD0 and /dev/ttyD1. I need to do another make install. Is there any solution?

output of lspci -v shows this:

03:01.0 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02 [16550])
    Subsystem: Device a000:1000
    Flags: bus master, medium devsel, latency 32, IRQ 19
    I/O ports at df00 [size=8]
    Memory at fbeff000 (32-bit, non-prefetchable) [size=4K]
    Memory at fbefe000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: [48] Power Management version 2
    Kernel driver in use: mcs9865-serial

03:01.1 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02 [16550])
    Subsystem: Device a000:1000
    Flags: bus master, medium devsel, latency 32, IRQ 18
    I/O ports at de00 [size=8]
    Memory at fbefd000 (32-bit, non-prefetchable) [size=4K]
    Memory at fbefc000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: [48] Power Management version 2
    Kernel driver in use: mcs9865-serial

03:01.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03 [IEEE1284])
    Subsystem: Device a000:2000
    Flags: bus master, medium devsel, latency 32, IRQ 7
    I/O ports at dd00 [size=8]
    I/O ports at dc00 [size=8]
    Memory at fbefb000 (32-bit, non-prefetchable) [size=4K]
    Memory at fbefa000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: [48] Power Management version 2

make install shows this:

cp mcs9865.ko mcs9865-isa.ko /lib/modules/2.6.32-5-amd64/kernel/drivers/serial/
depmod -A
chmod +x mcs9865
cp mcs9865 /etc/init.d/
ln -s /etc/init.d/mcs9865 /etc/rcS.d/S99mcs9865 || true
ln: creating symbolic link `/etc/rcS.d/S99mcs9865': File exists
modprobe mcs9865
modprobe mcs9865-isa

I'm running debian 6.0.5 with most updated packages.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The way this normally works is:

  • The module source code contains calls to the MODULE_DEVICE_TABLE macro to declare a table of device identifiers that this module supports.
  • In the compiled module, the aliases are stored as values of symbols called __mod_alias_NNN where the NNN are integers. The value encodes the bus identification for the device, e.g. pci:v00009710d00009865sv*sd*bc*sc*i* for the PCI device identified as vendor 0x9710, device 0x9865.
    They are also stored under the name __mod_pci_device_table for PCI devices, __mod_usb_device_table for USB devices, etc.
  • The depmod program creates an alias table mapping __mod_alias_NNN values to the module name. This table is stored in the file modules.alias at the root of the kernel modules directory, e.g. /lib/modules/2.6.32-5-amd64/modules.alias.
    It also creates files like modules.pcimap, modules.usbmap, …, which are used by the obsolete hotplug infrastructure which has been subsumed back into modprobe.
  • When the kernel detects a device for which no driver is present, it tries to load a module by calling the program indicated by the kernel.modprobe sysctl, which is sbin/modprobe by default. The kernel passes an argument to modprobe that indicates what driver is requested. For a PCI device, this is a name like pci:v00009710d00009865sv*sd*bc*sc*i*.
  • modprobe searches for a module with the given name. If it finds a module with the requested name (after following the alias defined in its configuration files, which include /etc/modprobe.d/*.conf and /lib/modules/$(uname -r)/modules.alias), it loads that module.
    modprobe will not load a module that has been blacklisted by a blacklist directive in its configuration files.

Run lspci -n to see the PCI ids of your device, and check the chain above to see where something went wrong.

Sometimes a driver works for a device that is very similar to the device it is intended for, but has a different PCI id. In that case, it's possible that the driver will work, but won't be loaded automatically because it doesn't declare the PCI id for your device. You can add the alias manually in /etc/modprobe/my_aliases.conf.

You can force a module to be loaded automatically at boot time by adding its name to /etc/modules.

share|improve this answer
add comment

A quick fix would be to run after every reboot

modprobe mcs9865
modprobe mcs9865-isa

to me it seems as if the kernel modules are not auto inserting.

there is an init script so you might just have to add it to the default run level with this

sudo update-rc.d mcs9865 defaults
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.