1 2Computone Intelliport II/Plus Multiport Serial Driver 3----------------------------------------------------- 4 5Release Notes For Linux Kernel 2.2 and higher. 6These notes are for the drivers which have already been integrated into the 7kernel and have been tested on Linux kernels 2.0, 2.2, and 2.3. 8 9Version: 1.2.4 10Date: 12/15/99 11Author: Andrew Manison <amanison@america.net> 12Testing: larryg@computone.com 13Support: support@computone.com 14Fixes and Updates: Doug McNash <dmcnash@computone.com> 15Proc Filesystem and Kernel Integration: Mike Warfield <mhw@wittsend.com> 16 17 18This file assumes that you are using the Computone drivers which are 19integrated into the kernel sources. For updating the drivers or installing 20drivers into kernels which do not already have Computone drivers, please 21refer to the instructions in the README.computone file in the driver patch. 22 23 241. INTRODUCTION 25 26This driver supports the entire family of Intelliport II/Plus controllers 27with the exception of the MicroChannel controllers. It does not support 28products previous to the Intelliport II. 29 30This driver was developed on the v2.0.x Linux tree and has been tested up 31to v2.2.13; it will probably not work with earlier v1.X kernels,. 32 33 342. QUICK INSTALLATION 35 36Hardware - If you have an ISA card, find a free interrupt and io port. 37 List those in use with `cat /proc/interrupts` and 38 `cat /proc/ioports`. Set the card dip switches to a free 39 address. You may need to configure your BIOS to reserve an 40 irq for an ISA card. PCI and EISA parameters are set 41 automagically. Insert card into computer with the power off 42 before or after drivers installation. 43 44 Note the hardware address from the Computone ISA cards installed into 45 the system. These are required for editing ip2.h or editing 46 /etc/config.modules, or for specification on the modprobe 47 command line. 48 49Software - 50 51Module installation: 52 53a) Obtain driver-kernel patch file 54b) Copy to the linux source tree root, Run ip2build (if not patch) 55c) Determine free irq/address to use if any (configure BIOS if need be) 56d) Run "make config" or "make menuconfig" or "make xconfig" 57 Select (m) module for CONFIG_COMPUTONE under character 58 devices. CONFIG_PCI and CONFIG_MODULES also may need to be set. 59e) Set address on ISA cards then: 60 edit /usr/src/linux/drivers/char/ip2/ip2.h if needed 61 or 62 edit /etc/conf.modules (or /etc/modules.conf) if needed (module). 63 or both to match this setting. 64f) Run "make dep" 65g) Run "make modules" 66h) Run "make modules_install" 67i) Run "/sbin/depmod -a" 68j) install driver using `modprobe ip2 <options>` (options listed below) 69k) run ip2mkdev (either the script below or the binary version) 70 71 72Kernel installation: 73 74a) Obtain driver-kernel patch file 75b) Copy to the linux source tree root, Run ip2build (if not patch) 76c) Determine free irq/address to use if any (configure BIOS if need be) 77d) Run "make config" or "make menuconfig" or "make xconfig" 78 Select (y) kernel for CONFIG_COMPUTONE under character 79 devices. CONFIG_PCI may need to be set if you have PCI bus. 80e) Set address on ISA cards then: 81 edit /usr/src/linux/drivers/char/ip2/ip2.h 82f) Run "make dep" 83g) Run "make zImage" or whatever target you prefer. 84h) mv /usr/src/linux/arch/i386/boot/zImage to /boot. 85i) Add new config for this kernel into /etc/lilo.conf, run "lilo" 86 or copy to a floppy disk and boot from that floppy disk. 87j) Reboot using this kernel 88k) run ip2mkdev (either the script below or the binary version) 89 90 913. INSTALLATION 92 93Previously, the driver sources were packaged with a set of patch files 94to update the character drivers' makefile and configuration file, and other 95kernel source files. A build script (ip2build) was included which applies 96the patches if needed, and build any utilities needed. 97What you recieve may be a single patch file in conventional kernel 98patch format build script. That form can also be applied by 99running patch -p1 < ThePatchFile. Otherwise run ip2build. 100 101The driver can be installed as a module (recommended) or built into the 102kernel. This is selected as for other drivers through the `make config` 103command from the root of the Linux source tree. If the driver is built 104into the kernel you will need to edit the file ip2.h to match the boards 105you are installing. See that file for instructions. If the driver is 106installed as a module the configuration can also be specified on the 107modprobe command line as follows: 108 109 modprobe ip2 irq=irq1,irq2,irq3,irq4 io=addr1,addr2,addr3,addr4 110 111where irqnum is one of the valid Intelliport II interrupts (3,4,5,7,10,11, 11212,15) and addr1-4 are the base addresses for up to four controllers. If 113the irqs are not specified the driver uses the default in ip2/ip2.h (which 114selects polled mode). If no base addresses are specified the defaults in 115ip2.h are used. If you are autoloading the driver module with kerneld or 116kmod the base addresses and interrupt number must also be set in ip2/ip2.h 117and recompile or just insert and options line in /etc/modules.conf or both. 118The options line is equivalent to the command line and takes precidence over 119what is in ip2.h. 120 121/etc/modules.conf sample: 122 options ip2 io=1,0x328 irq=1,10 123 alias char-major-71 ip2 124 alias char-major-72 ip2 125 alias char-major-73 ip2 126 127equivelant ip2.h: 128static ip2config_t ip2config = 129{ 130 {1,10,0,0}, 131 { 132 0x0001, // Board 0, ttyF0 - ttyF63 /* PCI card */ 133 0x0328, // Board 1, ttyF64 - ttyF127 /* ISA card */ 134 0x0000, // Board 2, ttyF128 - ttyF191 /* empty */ 135 0x0000 // Board 3, ttyF192 - ttyF255 /* empty */ 136 } 137}; 138 139 140Note: Both io and irq should be updated to reflect YOUR system. An "io" 141 address of "1/2" indicates a PCI/EISA card in the board table. The 142 PCI or EISA irq will be assigned automatically. 143 144Specifying an invalid or in-use irq will default the driver into 145running in polled mode for that card. If all irq entries are 0 then 146all cards will operate in polled mode. 147 148If you select the driver as part of the kernel run : 149 150 make depend 151 make zlilo (or whatever you do to create a bootable kernel) 152 153If you selected a module run : 154 155 make modules && make modules_install 156 157The utility ip2mkdev (see 5 and 7 below) creates all the device nodes 158required by the driver. For a device to be created it must be configured 159in the driver and the board must be installed. Only devices corresponding 160to real IntelliPort II ports are created. With multiple boards and expansion 161boxes this will leave gaps in the sequence of device names. ip2mkdev uses 162Linux tty naming conventions: ttyF0 - ttyF255 for normal devices, and 163cuf0 - cuf255 for callout devices. 164 165 1664. USING THE DRIVERS 167 168As noted above, the driver implements the ports in accordance with Linux 169conventions, and the devices should be interchangeable with the standard 170serial devices. (This is a key point for problem reporting: please make 171sure that what you are trying do works on the ttySx/cuax ports first; then 172tell us what went wrong with the ip2 ports!) 173 174Higher speeds can be obtained using the setserial utility which remaps 17538,400 bps (extb) to 57,600 bps, 115,200 bps, or a custom speed. 176Intelliport II installations using the PowerPort expansion module can 177use the custom speed setting to select the highest speeds: 153,600 bps, 178230,400 bps, 307,200 bps, 460,800bps and 921,600 bps. The base for 179custom baud rate configuration is fixed at 921,600 for cards/expantion 180modules with ST654's and 115200 for those with Cirrus CD1400's. This 181corresponds to the maximum bit rates those chips are capable. 182For example if the baud base is 921600 and the baud divisor is 18 then 183the custom rate is 921600/18 = 51200 bps. See the setserial man page for 184complete details. Of course if stty accepts the higher rates now you can 185use that as well as the standard ioctls(). 186 187 1885. ip2mkdev and assorted utilities... 189 190Several utilities, including the source for a binary ip2mkdev utility are 191available under .../drivers/char/ip2. These can be build by changing to 192that directory and typing "make" after the kernel has be built. If you do 193not wish to compile the binary utilities, the shell script below can be 194cut out and run as "ip2mkdev" to create the necessary device files. To 195use the ip2mkdev script, you must have procfs enabled and the proc file 196system mounted on /proc. 197 1986. NOTES 199 200This is a release version of the driver, but it is impossible to test it 201in all configurations of Linux. If there is any anomalous behaviour that 202does not match the standard serial port's behaviour please let us know. 203 204 2057. ip2mkdev shell script 206 207Previously, this script was simply attached here. It is now attached as a 208shar archive to make it easier to extract the script from the documentation. 209To create the ip2mkdev shell script change to a convenient directory (/tmp 210works just fine) and run the following command: 211 212 unshar /usr/src/linux/Documentation/computone.txt 213 (This file) 214 215You should now have a file ip2mkdev in your current working directory with 216permissions set to execute. Running that script with then create the 217necessary devices for the Computone boards, interfaces, and ports which 218are present on you system at the time it is run. 219 220 221#!/bin/sh 222# This is a shell archive (produced by GNU sharutils 4.2). 223# To extract the files from this archive, save it to some FILE, remove 224# everything before the `!/bin/sh' line above, then type `sh FILE'. 225# 226# Made on 1999-12-17 16:06 EST by <root@alcove.wittsend.com>. 227# Source directory was `/mnt2/src/linux-2.3.33/Documentation'. 228# 229# Existing files will *not* be overwritten unless `-c' is specified. 230# 231# This shar contains: 232# length mode name 233# ------ ---------- ------------------------------------------ 234# 3300 -rwxr-xr-x ip2mkdev 235# 236save_IFS="${IFS}" 237IFS="${IFS}:" 238gettext_dir=FAILED 239locale_dir=FAILED 240first_param="$1" 241for dir in $PATH 242do 243 if test "$gettext_dir" = FAILED && test -f $dir/gettext \ 244 && ($dir/gettext --version >/dev/null 2>&1) 245 then 246 set `$dir/gettext --version 2>&1` 247 if test "$3" = GNU 248 then 249 gettext_dir=$dir 250 fi 251 fi 252 if test "$locale_dir" = FAILED && test -f $dir/shar \ 253 && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) 254 then 255 locale_dir=`$dir/shar --print-text-domain-dir` 256 fi 257done 258IFS="$save_IFS" 259if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED 260then 261 echo=echo 262else 263 TEXTDOMAINDIR=$locale_dir 264 export TEXTDOMAINDIR 265 TEXTDOMAIN=sharutils 266 export TEXTDOMAIN 267 echo="$gettext_dir/gettext -s" 268fi 269touch -am 1231235999 $$.touch >/dev/null 2>&1 270if test ! -f 1231235999 && test -f $$.touch; then 271 shar_touch=touch 272else 273 shar_touch=: 274 echo 275 $echo 'WARNING: not restoring timestamps. Consider getting and' 276 $echo "installing GNU \`touch', distributed in GNU File Utilities..." 277 echo 278fi 279rm -f 1231235999 $$.touch 280# 281if mkdir _sh06360; then 282 $echo 'x -' 'creating lock directory' 283else 284 $echo 'failed to create lock directory' 285 exit 1 286fi 287# ============= ip2mkdev ============== 288if test -f 'ip2mkdev' && test "$first_param" != -c; then 289 $echo 'x -' SKIPPING 'ip2mkdev' '(file already exists)' 290else 291 $echo 'x -' extracting 'ip2mkdev' '(text)' 292 sed 's/^X//' << 'SHAR_EOF' > 'ip2mkdev' && 293#!/bin/sh - 294X 295# ip2mkdev 296# 297# Make or remove devices as needed for Computone Intelliport drivers 298# 299# First rule! If the dev file exists and you need it, don't mess 300# with it. That prevents us from screwing up open ttys, ownership 301# and permissions on a running system! 302# 303# This script will NOT remove devices that no longer exist because 304# their board or interface box has been removed. If you want to get 305# rid of them, you can manually do an "rm -f /dev/ttyF* /dev/cuaf*" 306# before running this script, which will then recreate all the valid 307# devices 308# 309# =mhw= 310# Michael H. Warfield 311# mhw@wittsend.com 312# 313if test ! -f /proc/tty/drivers 314then 315X echo "\ 316Unable to check driver status. 317Make sure proc file system is mounted." 318X 319X exit 255 320fi 321X 322if test ! -f /proc/tty/driver/ip2 323then 324X echo "\ 325Unable to locate ip2 proc file. 326Attempting to load driver" 327X 328X if /sbin/insmod ip2 329X then 330X if test ! -f /proc/tty/driver/ip2 331X then 332X echo "\ 333Unable to locate ip2 proc file after loading driver. 334Driver initialization failure or driver version error. 335" 336X exit 255 337X fi 338X else 339X echo "Unable to load ip2 driver." 340X exit 255 341X fi 342fi 343X 344# Ok... So we got the driver loaded and we can locate the procfs files. 345# Next we need our major numbers. 346X 347TTYMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/tty/!d' -e 's/.*tty.[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` 348CUAMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/cu/!d' -e 's/.*cu.[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` 349BRDMAJOR=`sed -e '/^Driver: /!d' -e 's/.*IMajor=\([0-9]*\)[ ]*.*/\1/' < /proc/tty/driver/ip2` 350X 351echo "\ 352TTYMAJOR = $TTYMAJOR 353CUAMAJOR = $CUAMAJOR 354BRDMAJOR = $BRDMAJOR 355" 356X 357# Ok... Now we should know our major numbers, if appropriate... 358# Now we need our boards and start the device loops. 359X 360grep '^Board [0-9]:' /proc/tty/driver/ip2 | while read token number type alltherest 361do 362X # The test for blank "type" will catch the stats lead-in lines 363X # if they exist in the file 364X if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = "" 365X then 366X continue 367X fi 368X 369X BOARDNO=`expr "$number" : '\([0-9]\):'` 370X PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '` 371X MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '` 372X 373X if test "$BOARDNO" = "" -o "$PORTS" = "" 374X then 375# This may be a bug. We should at least get this much information 376X echo "Unable to process board line" 377X continue 378X fi 379X 380X if test "$MINORS" = "" 381X then 382# Silently skip this one. This board seems to have no boxes 383X continue 384X fi 385X 386X echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS" 387X 388X if test "$BRDMAJOR" != "" 389X then 390X BRDMINOR=`expr $BOARDNO \* 4` 391X STSMINOR=`expr $BRDMINOR + 1` 392X if test ! -c /dev/ip2ipl$BOARDNO ; then 393X mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR 394X fi 395X if test ! -c /dev/ip2stat$BOARDNO ; then 396X mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR 397X fi 398X fi 399X 400X if test "$TTYMAJOR" != "" 401X then 402X PORTNO=$BOARDBASE 403X 404X for PORTNO in $MINORS 405X do 406X if test ! -c /dev/ttyF$PORTNO ; then 407X # We got the harware but no device - make it 408X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO 409X fi 410X done 411X fi 412X 413X if test "$CUAMAJOR" != "" 414X then 415X PORTNO=$BOARDBASE 416X 417X for PORTNO in $MINORS 418X do 419X if test ! -c /dev/cuf$PORTNO ; then 420X # We got the harware but no device - make it 421X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO 422X fi 423X done 424X fi 425done 426X 427Xexit 0 428SHAR_EOF 429 $shar_touch -am 1217160599 'ip2mkdev' && 430 chmod 0755 'ip2mkdev' || 431 $echo 'restore of' 'ip2mkdev' 'failed' 432 if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ 433 && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then 434 md5sum -c << SHAR_EOF >/dev/null 2>&1 \ 435 || $echo 'ip2mkdev:' 'MD5 check failed' 436eccd181f4a2005e47a969fc83885df61 ip2mkdev 437SHAR_EOF 438 else 439 shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'ip2mkdev'`" 440 test 3300 -eq "$shar_count" || 441 $echo 'ip2mkdev:' 'original size' '3300,' 'current size' "$shar_count!" 442 fi 443fi 444rm -fr _sh06360 445exit 0 446

