Technical tips for SX card on Linux

Issue:

Question & Answer for problems encountered with the SX host card on Linux.

1. How do I configure the SX card to use an interrupt instead of “timer-based polling”?

2. How do I know whether the sx module has been successfully loaded?

3. How do I know whether the sx_firmware is loaded?

4. Do you recommend the use of “timer-based polling” or the use of interrupts? 

5. Where on my system can I find resource information for my SX “PCI” card(s)?

6. Where on my system can I find resource information for my SX “ISA card(s)?

7. The following error message appears when I try to apply the SX patch. 
“Can’t find a file to patch at input line x . Perhaps you should have used the –p or - - strip option? 
The text leading up to this was:  | diff –ur linux-2.0.36.clean/CREDITS…”

8. The following messages appear when I load the sx_firmware:
“Can’t locate module sx”   or  “no dependency information for module”  or  “sx firmware: can’t open
device /dev/specialix_sxctl: operation not supported by device”.

9. My SX card(s) module is loaded but no getty processes are running / no login screen.

10. I get the following error message after I reboot my system or manually load sx_firmware.
sx_firmware: can’t open device ‘/dev/specialix_sxctl’: No such device

Solution:

1. Answer: If you decide to use interrupts for one reason or another, your system must have an available interrupt for every SX card to be installed. On the ISA bus, you can’t share interrupts.  On the PCI bus, the motherboard BIOS will assign an interrupt and can also share interrupts.  Keep in mind that SX cards only allow a few interrupts, typically IRQ 9, 11, 12, 15.  The SX driver will resort to  “timer-based polling” when it can’t use the interrupt for one  reason or another.  The following command may help you to determine which interrupts are available on your system:  

cat  /proc/interrupts 

If there are any available interrupts available on your system, refer to Table 1 below to find the values for the “sx_poll” and the “sx-irqmask” options. 

interupt options  
9    sx_poll=0 sx_irqmask=0x0200 
11  sx_poll=0 sx_irqmask=0x0800 
12  sx_poll=0 sx_irqmask=0x1000 
15  sx_poll=0 sx_irqmask=0x8000 

Timer based polling (Non-interrupt mode)  sx_poll=1 sx_irqmask=0 

For example,  if interrupt 11 was available on your system, you would enter the following options to tell the SX driver that IRQ 11 is available.  

sx_poll=0  sx_irqmask=0x0800

If you were installing 2 or more SX “ISA” cards and wanted to use interrupts,  first make sure that the “memory address” dip switch settings on the SX cards are set differently and set apart by a  64K boundary from one another.  SX cards have to tell the bus controller that they like their timing based on a 64K window which the memory address falls into.  Refer to the SX Users Guide for dip switch settings.  Next, add the sx_irqmask values of the IRQs to be assigned.  For example, add the hexadecimal values for IRQ 9 and 11 from Table 1:  
0x0200 + 0x0800 =  0x0A00. 
Therefore, the following options would tell the driver that IRQ 9 and 11 are available:  
sx_poll=0  sx_irqmask=0x0A00


2. Answer: Use the “lsmod” command to determine which modules the system has loaded. The sx module will appear as “sx” followed by memory usage and the number of login processes running.


3. Answer: Depending on how many SX cards (boards) are installed and ports (channels) configured,  the following message appears after the sx_firmware is loaded:  
“initialized x channels on x  boards”


4. Answer: “Timer-based polling” is recommended and is especially useful when installing multiple SX cards in the same system and/or when there are not enough available interrupts on the system. There is no known performance degradation.


5. Answer: PCI cards are listed in “/proc/pci”. 


6. Answer: The SX driver will report  “found an SX card at …“  in the kernel log located in /var/log/dmesg”. However, nothing will be reported if there is a resource conflict.


7. Answer: Probably haven’t installed the Kernel sources. Install the kernel sources either from the CDROM package as follows: rpm –ivh /cdrom/RedHat/RPMS/kernel-source*.rpm  or  obtain the sources from the RedHat FTP site. 


8. Answer: Try manually running “/sbin/depmod –a”. If it resolves the problem, add it to the startup script in “/etc/rc.d/rc.sysinit” so it loads automatically.


9. Answer: Probably need to configure logins in /etc/inittab, or need to include run level 5 for  all logins.  Furthermore, if you assigned interrupts to the SX card(s), the cause may be a resource conflict.  Try using “timer-based polling” (sx_poll=1 sx_irqmask=0).


10. Answer: Ensure that you enabled support for the SX card in the kernel configuration (see Step 7)
and compiled the kernel.

Related Articles:
1.) Perle Multiport Serial Cards and the Linux kernel


Article ID:
73
Published:
1/17/2003 8:59:22 AM
Last Modified:
1/17/2003 9:00:01 AM
Issue Type:
Trouble Shooting