8 serial ports pci-e card; only 4 detected .

Dear All,

I have an PCI-e X1 card Oxford Semiconductor Ltd OX16PCI954 made of 2*4 e.g 8 serial 16950 UARTs.

lspci -v, reports two detections on same slot (there is two chips on the daugther pci-e board):

04:04.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 0 (Uart)
04:04.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 1 (8bit bus)
04:08.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 0 (Uart)
04:08.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 1 (8bit bus)

lspci -vvv well detects addresses of those 2 chips (each manage 4 serial ports) as based 0xa000 for first chip and based 0xa400 for second chip.

but setserial -g /dev/ttyS* reports :
/dev/ttyS0, UART: 16950/954, Port: 0xa000, IRQ: 17
/dev/ttyS1, UART: 16950/954, Port: 0xa008, IRQ: 17
/dev/ttyS2, UART: 16950/954, Port: 0xa010, IRQ: 17
/dev/ttyS3, UART: 16950/954, Port: 0xa018, IRQ: 17
/dev/ttyS4: No such device or adress
/dev/ttyS5: No such device or adress
/dev/ttyS6: No such device or adress
/dev/ttyS7: No such device or adress

as if only the 4 first ports were scanned.

I guess the serial driver by default installs 8 /dev/ttySx but only scans 4 of them.
So I’ve added command : 8250.nr_uarts=8 to my file menu.lst of grub boot. It’s now :

###Don’t change this comment - YaST2 identifier: Original name: linux-2.6.25.18-0.2-default###
title openSUSE 11.0 - 2.6.25.18-0.2 (default)
kernel (hd0,0)/vmlinuz-2.6.25.18-0.2-default root=/dev/md0 resume=/dev/sda2 splash=silent showopts 8250.nr_uarts=8 nr_uarts=8 vga=0x31a
initrd (hd0,0)/initrd-2.6.25.18-0.2-default

Nothing changed, always only 4 ports detected and boot config continues to check only 4 ports, as config reports! >:(:

cat /boot/config-2.6.25.18-0.2-default |grep UARTS
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4

What is the mistake?
Any idea?

Thx for support,
Hervé

Hi
If I look at the src and config on this machine I get;


cat /usr/src/linux/.config |grep UART
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIBTUART=m
CONFIG_SERIAL_8250_NR_UARTS=8
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SND_MPU401_UART=m
CONFIG_SOUND_UART6850=m
CONFIG_SDIO_UART=m

cat /boot/config-2.6.25.18-0.2-default
|grep UARTS CONFIG_SERIAL_8250_NR_UARTS=8
CONFIG_SERIAL_8250_RUNTIME_UARTS=4

What happens if you only change the runtime value?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 5:22, 2 users, load average: 0.00, 0.06, 0.20
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

Hi,

1/
I do not have a file /usr/src/linux/.config

2/
Just to remind you the /dev/ttyS1-7 are well diplayed (ls -l /dev/ttyS*). That is the association with an serial port that fails for ttyS4-7 (no such device or address)

So,
UARTS CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
is the initial config I have.

Doing,
UARTS CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=8

=> no effet, tty4-7 not detected (no such device or address).

Do you I have to understand that the file /boot/config-2.6.25.18-0.2-default can be modified and have an effet to boot time, or is it only the report of the compiled kernel flags?
I thought only parameters passed to grub are taken into account.

Any other idea?

3/ How can I know which driver is used for ttyS1-3 (I guess 8250) ?

Thx
Hervé

Hi
Looking at the kernel source, you may need to compile the serial
driver for 8 runtime ones. Can you have a look at the output of lsmod.
Is there a module serial_pci running, this one is meant to be for PCI
serial cards?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 19:00, 2 users, load average: 0.55, 0.71, 0.37
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

Here is my lsmod. No serial_pci loaded.

Module Size Used by
af_packet 42624 2
iptable_filter 20736 0
ip_tables 39056 1 iptable_filter
ip6table_filter 20608 0
ip6_tables 40720 1 ip6table_filter
x_tables 43144 2 ip_tables,ip6_tables
ipv6 331544 54
microcode 32808 0
firmware_class 27776 1 microcode
cpufreq_conservative 26248 0
cpufreq_userspace 23556 0
cpufreq_powersave 18816 0
acpi_cpufreq 27536 0
bridge 81192 1
bnep 35200 2
snd_pcm_oss 68992 0
snd_mixer_oss 35584 1 snd_pcm_oss
snd_seq 83600 0
snd_seq_device 26516 1 snd_seq
binfmt_misc 30220 1
fuse 72384 1
nls_utf8 19072 1
nls_iso8859_1 22144 2
nls_cp437 23936 2
vfat 30848 2
fat 74168 1 vfat
ext3 171024 5
jbd 82368 1 ext3
mbcache 27396 1 ext3
loop 37508 6
dm_mod 88600 0
rfcomm 63392 4
l2cap 44160 12 bnep,rfcomm
ftdi_sio 57736 1
rtc_cmos 28728 0
ppdev 26504 0
usbserial 56512 3 ftdi_sio
parport_pc 59592 0
rtc_core 41012 1 rtc_cmos
rtc_lib 20224 1 rtc_core
snd_hda_intel 497580 1
hci_usb 34716 0
i2c_i801 27804 0
parport 60448 2 ppdev,parport_pc
floppy 83048 0
snd_pcm 115208 2 snd_pcm_oss,snd_hda_intel
i2c_core 45344 1 i2c_i801
snd_timer 45072 2 snd_seq,snd_pcm
iTCO_wdt 30800 0
usbhid 65488 0
snd_page_alloc 28688 2 snd_hda_intel,snd_pcm
iTCO_vendor_support 21124 1 iTCO_wdt
snd_hwdep 28424 1 snd_hda_intel
shpchp 53660 0
sr_mod 35892 0
r8169 51332 0
btusb 25496 2
usb_storage 112928 2
hid 59296 1 usbhid
pci_hotplug 49720 1 shpchp
cdrom 53416 1 sr_mod
snd 96248 10 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
sg 56912 0
soundcore 26000 1 snd
ff_memless 23176 1 usbhid
button 27040 0
intel_agp 48240 0
bluetooth 82340 9 bnep,rfcomm,l2cap,hci_usb,btusb
raid1 43136 1
raid0 24832 0
ohci_hcd 42628 0
sd_mod 47408 46
ehci_hcd 56204 0
uhci_hcd 43936 0
usbcore 188376 13 ftdi_sio,usbserial,hci_usb,usbhid,btusb,usb_storage,ohci_hcd,ehci_hcd,uhci_hcd
edd 28176 0
raid456 147232 4
async_xor 21504 1 raid456
async_memcpy 19840 1 raid456
async_tx 26084 3 raid456,async_xor,async_memcpy
xor 22672 2 raid456,async_xor
xfs 564488 7
fan 23944 0
ahci 51080 18
pata_jmicron 23808 1
sata_sil24 36100 4
sata_promise 33028 4
libata 195232 4 ahci,pata_jmicron,sata_sil24,sata_promise
scsi_mod 195160 5 sr_mod,usb_storage,sg,sd_mod,libata
dock 29344 1 libata
thermal 44448 0
processor 72792 2 acpi_cpufreq,thermal

I guess the file that manage my first serial port is
/usr/src/linux/drivers/serial/8250.c

1/ That’s very bad thing, the variable nr_uarts isn’t changing things. I din’t want to re-compile each after new kernel upgrade.

2/ Is it possible to just compile the serial driver or do I have to run the whole kernel compilation. Any wiki about this?

Thx
Herve

Hi
Maybe a modprobe serial_pci and see if that makes a difference?

I’m thinking changing those variables is only relevant to onboard
serial, not pci etc…

Yes, you can just compile a module and copy it over.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 21:00, 2 users, load average: 0.21, 0.27, 0.26
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

Hi
The pdf file here may gives some extra clues too…
http://digital.ni.com/manuals.nsf/websearch/5DFD73939CFA3AC8862567DF00778BF1


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 21:13, 2 users, load average: 0.39, 0.19, 0.18
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

modprobe serial_pci doesn’t found the driver, so I decided to make my ‘first’ Linux compile.
After readind the HowTo compile OpenSuse, I

  • copyed the /boot/config2.6.25.18-0.2-default file to /usr/src/linux/.config
  • make clean
  • make oldconfig
  • changed the uarts parameters to 8 in .config
    CONFIG_SERIAL_8250_NR_UARTS=8
    CONFIG_SERIAL_8250_RUNTIME_UARTS=8
  • I also changed in .config the release subversion not to erase my actual linux kernel version (used today’s date yyyymmddversion)
    CONFIG_LOCAL_VERSION=2008110701
  • make then went to take several coffees and aspirins :wink:
  • make modules_install
  • make install
  • read the /boot to check my new kernel was in , and checked /boot/grub/menu.lst
  • rebooted …pray OpenSuse angels :slight_smile:
    and Here we are…all is running well (exept I do not have the Opensuse grub green color menu at startup to male kernel selection)
  • then now :slight_smile: …setserial -g /dev/ttyS* makes appear all 8 serial 16C950/954 :

/dev/ttyS0, UART: 16950/954, Port: 0xa400, IRQ: 17
/dev/ttyS1, UART: 16950/954, Port: 0xa408, IRQ: 17
/dev/ttyS2, UART: 16950/954, Port: 0xa410, IRQ: 17
/dev/ttyS3, UART: 16950/954, Port: 0xa418, IRQ: 17
/dev/ttyS4, UART: 16950/954, Port: 0xa000, IRQ: 17
/dev/ttyS5, UART: 16950/954, Port: 0xa008, IRQ: 17
/dev/ttyS6, UART: 16950/954, Port: 0xa010, IRQ: 17
/dev/ttyS7, UART: 16950/954, Port: 0xa018, IRQ: 17

I will now check what is happening if two or more serials run at the same time, due to Irq sharing. Otherwise I will add some parameters in .config

Latest question: How to get back the nice green grub menu at startup - the one where you can (auto) select the kernel version?

So all is fine now, and I would like to thank you so much for the time you spent to help me.
Sincerelly,
Hervé

Hi
Looking good :slight_smile: I would have just tried to make the module… maybe at
the next kernel update it can be revisited :slight_smile:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 1 day 5:26, 2 users, load average: 0.91, 1.10, 0.67
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

Hello,

OK let me know if you do something at the next kernel revision.
FYI: ttyS0-3 are detected as the second series of 4 ports of the card (PCI Interrupt 0000:04:08.0), and ttyS4-7 the first 4 port series (PCI Interrupt 0000:04:04.0).
Here is extract of dmesg.
Thx
Hervé

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ACPI: PCI Interrupt 0000:04:04.0[A] -> GSI 17 (level, low) -> IRQ 17
ttyS4: detected caps 00000700 should be 00000100
0000:04:04.0: ttyS4 at I/O 0xa000 (irq = 17) is a 16C950/954
ttyS5: detected caps 00000700 should be 00000100
0000:04:04.0: ttyS5 at I/O 0xa008 (irq = 17) is a 16C950/954
ttyS6: detected caps 00000700 should be 00000100
0000:04:04.0: ttyS6 at I/O 0xa010 (irq = 17) is a 16C950/954
ttyS7: detected caps 00000700 should be 00000100
0000:04:04.0: ttyS7 at I/O 0xa018 (irq = 17) is a 16C950/954
ACPI: PCI Interrupt 0000:04:04.1[A] -> GSI 17 (level, low) -> IRQ 17
ACPI: PCI Interrupt 0000:04:08.0[A] -> GSI 17 (level, low) -> IRQ 17
ttyS0: detected caps 00000700 should be 00000100
0000:04:08.0: ttyS0 at I/O 0xa400 (irq = 17) is a 16C950/954
ttyS1: detected caps 00000700 should be 00000100
0000:04:08.0: ttyS1 at I/O 0xa408 (irq = 17) is a 16C950/954
ttyS2: detected caps 00000700 should be 00000100
0000:04:08.0: ttyS2 at I/O 0xa410 (irq = 17) is a 16C950/954
ttyS3: detected caps 00000700 should be 00000100
0000:04:08.0: ttyS3 at I/O 0xa418 (irq = 17) is a 16C950/954
ACPI: PCI Interrupt 0000:04:08.1[A] -> GSI 17 (level, low) -> IRQ 17
Couldn’t register serial port 0000:04:08.1: -28

There is no problem with sharing PCI IRQs.