| yellen.com |
|
| linux() | main | spam | linux | crypto | vr6 | misc | links |
|
Hardware Setup:You need to assign the card a unique IRQ. This should be a very simple task if you have a good BIOS. Just go in the BIOS setup and give the PCI slot an IRQ that isn't used. It might not be that easy. It wasn't for me. First of all, my workstation is a Dell Precision 610, with dual 550MHz Pentium III Xeons. The Dell BIOS sucks! It gives you absolutely no control over how IRQ's are assigned to the PCI bus. It seems that the IRQ is assigned based on which slot the PCI card is inserted into. I had to move all the cards around until I got an IRQ that I liked. Completely retarded. For my setup that happened to be IRQ 16. Remember I have a SMP machine so I get twice as many IRQ's as a single processor machine. You have to make sure the IRQ is not shared with other devices. This is very important. The serial driver can handle a shared IRQ, but many other drivers cannot. Plus, the serial card is going to be generating a large number of IRQ's. Once you have an IRQ assigned make sure the IRQ is not being shared with another device by running 'cat /proc/interrupts'. Keep fighting with the BIOS until you get it. Now, examine the PCI bus by running 'cat /proc/pci'. You should see a line saying something about a serial controller. This is what my /proc/pci looks like:
... Bus 0, device 13, function 0: Serial controller: Unknown vendor Unknown device (rev 0). Vendor id=1407. Device id=200. Slow devsel. Fast back-to-back capable. IRQ 16. I/O at 0xd800 [0xd801]. I/O at 0xd400 [0xd401]. ... Make sure the IRQ is correct. Also find the I/O port lines and write them down. In my example I would write down '0xd800 and 0xd400 using IRQ 16'. Your output might be different from mine. Hardware setup is now done.
Software Setup:
First, you must modify a header file in the kernel. Go into /usr/src/linux/include/asm-i386/
and open serial.h in your favorite editor.
Find the lines that describe ttyS4 and ttyS5. Now modify those lines to
reflect your hardware setup. For flags, use STD_COM_FLAGS. This is what
my modified serial.h file looks like:
...
#define STD_SERIAL_PORT_DEFNS \
/* UART CLK PORT IRQ FLAGS */ \
{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
#ifdef CONFIG_SERIAL_MANY_PORTS
#define EXTRA_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0xD800, 16, STD_COM_FLAGS }, /* ttyS4 */ \ <== modify this line
{ 0, BASE_BAUD, 0xD400, 16, STD_COM_FLAGS }, /* ttyS5 */ \ <== modify this line
{ 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \
{ 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \
...
If you're lazy, you can download my serial.h
In your kernel config, make sure you enable "Extended dumb serial driver
options", "Support more than 4 serial ports" and "Support for sharing
serial interrupts" in the Character devices section. Build the new kernel.
Now you need to modify your rc.d scripts to run setserial everytime you
boot. I made an rc.serial file that is automatically executed by rc.sysint.
Here is what is looks like:
echo 'Setting up serial ports' setserial /dev/ttyS0 spd_vhi low_latency setserial /dev/ttyS1 spd_vhi low_latency setserial /dev/ttyS4 spd_hi low_latency setserial /dev/ttyS5 spd_hi low_latency
Reboot the machine. The new serial ports will appear as /dev/ttyS4 and
/dev/ttyS5. If, like me, you are using the LavaPort PCI card with an ISDN
modem you need to pay attention to the options pppd uses. The LavaPort
PCI card runs the serial clock 4x faster than normal cards. Therefore,
instead of giving pppd the usual 115200 option you would specify 57600
which is actually telling the card to run at 230400 baud. Still have questions... email me. |
last modified Fri Sep 14 15:13:58 2001
copyright © 2001 adam yellen