CAUTION: The PTF #s in the document are subject to change and could be out of date. Use this document as a reference only. 128-Port Device Configuration Guide ____________________________________________________________________________ Version 2.0 TTY Configurations (tty devices): 10-pin - With the 10-wire configuration, all pins will be wired if the cabling is correct, and nothing more should be necessary for this to work - just the pigtail, interposer, and standard IBM serial cable. 8-pin - With the 8-wire configuration, carrier detect is not pinned; therefore, we must do one of several things in order for the system to be able to open() the device: - set "altpin" via smit or stty-cxma - set "forcedcd" vie smit or stty-cxma - set "clocal" in the RUNMODES and LOGMODES in smit. The preferable method is "altpin", but any of the above should work - assuming they don't have any other configuration related problems (such as cabling). If in doubt - try another. The standard printer/terminal interposer may be used with this configuration. 6-pin - With this configuration, you should be able to get either RTS/CTS or XON/XOFF flow control to work. In order to access the device, you MUST set "forcdcd", either through smit or the stty-cxma command. If you set clocal on the RUNMODES and/or LOGMODES, you run the risk of having that setting wiped out by some user application. 4-pin - With only 4 wires pinned, you are limited to TD,RD,FG, and SG. Any other wireing configuration is NOT supported. This limits the use of a 4-wire cable to xon/xoff flow control. You must set either "clocal" in the RUNMODES and LOGMODES, or set "forcdcd" through smit or the stty-cxma command. If using "clocal", the same warning goaes as described in the 6-pin configuration. Printer Configurations (lp devices): 10-pin - With the full complement of signals being pinned, you aren't limited to the type of flow control that you can do. You can do either DTR or XON/XOFF pacing. There shouldn't be any need to set any stty-cxma options. However, please note that although fastcook or any other 128-port specific settings don't show up, they can still be set (fastcook defaults to on, so to change this to off, you need to run "stty-cxma -fastcook lp#", or the example code in Appendix A). 8-pin - With 8 wires, you lose either DSR or DCD. If you plan on using DTR pacing, you MUST use altpin - remember that DTR on the printer side is tied to DCD on the RISC side. "Altpin" can be set by the stty-cxma command or the example code provided in Appendix A. If using only XON/XOFF pacing, you don't need to worry about altpin. 6-pin - With 6 wires, you don't have DSR,DTR, or DCD pinned. This means that it is not physically possible to do DTR pacing. 4-pin - You can only do XON/XOFF pacing, and you must have TD, RD, SG, and FG pinned. Notes on Cabling: The above cabling and functional specifications are simply derived from the physical cababilites of using one of the following connectors on the 128-port concentrator: RJ11-4pin, RJ11-6pin, RJ45-8pin, or RJ45-10pin. They do not imply that using a four-wire cable means only having the above listed signals - just that using a 4-PIN RJ-11 connector only allows you to use these signals. You are free to use a RJ45-10pin with as many or as few wires as you wish; however, IBM is not responsible for the functionality you require without the proper cabling. Known Problems: ix33411 - data that was written out the device prior to a close() is getting messed up. This can result in one or more of the following things: loss of data, partial tty hang (fixed by pdisable/penable), or a complete tty hang (must reset concentrator or reboot to fix). If you suspect either of the hang problems, run crash on the port and look at the "ch flags" line and look for the wempty flag being set. If this is set, this is what is happening. This problem ONLY affects tty devices. ix33873 - unable to access device after a reboot if either CD isn't pinned or the printer doesn't present CD high. Doing any chdev command will fix this problem, or setting "forcdcd" from the stty-cxma command. This ONLY affects printer devices. ix33900 - Various problems related to having fastcook set with any thing other than posix on the top of the stack. Fixes strange problems with printers or slip connections. Toggling fastcook off then on will fix the problem if this is the correct apar. ix33501 - system hang, usually no leds. Random events can lead to an occasional hang - usually when one of the sync lines are unterminated. Stack trace includes the following: cxmadd:cxma_cmdw cxmadd:cxma_proc cxmadd:cxma_service ix33582 - System crash when multiple processes accessing the same printer device at the same time. Stack trace will show a call to sp_sleep. ix33626 - Printers off of 128-port can come up with posix on the stack instead of sptr after reboot. Usually if there are no other printers defined on the system except off of the 128-port card, these printers get configured incorrectly because the 128-port config code wasn't checking to see if the sptrdd was loaded into the kernel. So when it wasn't loaded, it defaulted to posix. You can do the following as a workaround: /usr/lbin/tty/ttyconf -l sptr stty disp sptr < ix33485 - terminal attached printing not working - data doing to screen instead off printer. Reference the 128-PORT.transparent fax. ix35002 - System crash in cxma_nread. Turn off fastcook for workaround. Stty-cxma Command Options: altpin - Switches the physical pinnings of CD and DSR in the concentrator. This is desired when using an 8-wire connection for a tty device. Not setable through smit for printer devices. fastcook - Downloads some of the character processing down into the concentrator and the card, thus reducing the cpu load for that process. Does not give any improvement during normal usage - only when things are being stressed. Can also cause problems such as some that are listed above. Not setable through smit for printer devices, though it does default to on. focedcd - Does the same thing as setting "clocal" in the RUNMODES and LOGMODES, but tends to be more reliable. Useful for 4 or 6 wire tty configurations. Not setable through smit for printer devices. General Debugging Tips: If you can't cat to the device, verify the following - Cabling! If CD isn't pinned (tty), you need to set "forcedcd" or "clocal". If this is a printer device, make sure CTS is pinned and high. These signals can be checked from the LED's on the concentrator for that port location. Beware of apars: ix33873. Flow control problems - If using DTR pacing, verify dtr is on the tty stack. Make sure printer is set up to agree to match the tty definition. Beware of apars: ix33626, and ix34391 Non-Flow control problems - If a tty, verify posix and cxma settings with stty-cxma -a tty#. If an lp device, get an idea of what type problem they are seeing and pursue from there (i.e. formatting, messages, etc.). Verify the tty stack is correct for this configuration. DTR pacing - Remember that we look for a change in carrier detect for printer DTR flow control. When we see CD drop, we stop sending data. Usually, CD should be pinned to DTR on the printer side, but not always - some printers are strange . . . CD - For a tty device, we use this signal to determine if the device is "there". If we don't have the CD signal, and don't have clocal or forcedcd set, we will be unable to open the device. For printers, the "clocal" bit should be set automatically - eliminating the need for this signal, but be on the lookout for ix33873 . . . CTS - For a printer device, this is the signal that tells us the printer is "ready". If this signal isn't high, the device is said to be busy. Checklist: Do you have all the required ptfs? If the machine is crashing, what did you do exactly to make it happen, and does this happen everytime? What stty-cxma settings are you using for this device? (i.e. altpin, forcedcd, fastcook ) Are these appropriate for your cabling/setup? Have you verified cabling/signals through the led indicators on the concentrator? Appendix A - C-code workarounds for settings not setable or reliable through smit that can be run at boot time without hanging if the printer is off. /* DTR.c - verifies that DTR is correctly set on the stack */ #include < #include < #include < #include < main(int argc, char *argv[]) { int fd = open(argv[1], O_NDELAY,O_RDWR); ioctl(fd,TXDELCD,"dtr"); ioctl(fd,TXADDCD,"dtr"); close(fd); } /* ALTPIN.c - sets/unsets altpin on a specified device */ #include < #include < #include < main(int argc, char *argv[]) { struct cxma_struct digi; int fd = open(argv[1], O_NDELAY|O_RDWR); ioctl(fd,CXMA_GETA,&digi); /* use this next line to set altpin */ digi.cxma_flags |= ( CXMA_ALTPIN ); /* use this next line to unset altpin */ digi.cxma_flags &= ~( CXMA_ALTPIN ); ioctl(fd,CXMA_SETA,&digi); close(fd); } /* FORCEDCD.c - sets/unsets forcedcd on a specified device */ #include < #include < #include < main(int argc, char *argv[]) { struct cxma_struct digi; int fd = open(argv[1], O_NDELAY|O_RDWR); ioctl(fd,CXMA_GETA,&digi); /* use this next line to set forcedcd */ digi.cxma_flags |= ( CXMA_FORCEDCD ); /* use this next line to unset forcedcd */ digi.cxma_flags &= ~( CXMA_FORCEDCD ); ioctl(fd,CXMA_SETA,&digi); close(fd); } /* FASTCOOK.c - sets/unsets fastcook on a specified device */ #include < #include < #include < main(int argc, char *argv[]) { struct cxma_struct digi; int fd = open(argv[1], O_NDELAY|O_RDWR); ioctl(fd,CXMA_GETA,&digi); /* use this next line to set fastcook */ digi.cxma_flags |= CXMA_COOK; /* use this next line to unset fastcook */ digi.cxma_flags &= ~( CXMA_COOK ); ioctl(fd,CXMA_SETA,&digi); close(fd); } Appendix B - General debugging/configuration commands: /usr/lbin/tty/stty-cxma < < argument: either "-a", "get", or an cxma option. splp and stty - see info documentation crash command Used to interactively look at things in the kernal. Start with: crash | tee c.out You should get a greater than sign ''>" - this is your prompt. Common commands to use are: ''tty <" - gives information on the tty structure in memory ''p" - gives listing of processes ''t -m <" - either run against the current process without the optional argumant (after a system crash, looking at system dump), or with the optional argument looking at the trace back of a process that is possibly hung. 03/26/93 - JAWS