原创 serial ports not recognized ★★★★

2011-6-14 21:37 1979 10 6 分类: MCU/ 嵌入式
遇到的问题和我类似
 
2006-05-03, 10:36 AM CDT
BlueDevil Offline type=text/javascript> vbmenu_register("postmenu_520212", true);
Registered User
 
Join Date: May 2006
Posts: 4
serial ports not recognized after upgrade to FC5 from RHEL3

Do to a hard disk failure I moved (on a new hard drive) to FC5 from RHEL3. I had two dual port serial cards from StarTech.com installed and working fine under RHEL3. So I had a total of 6 serial ports on ttyS0-5. In FC5 though I cannot get ports 5 and 6 to work. They were at ttyS4 and ttyS5. dmesg shows no device at address when it setserials the second serial port card. But lspci shows the second card just fine and recognizes it correctly. /proc/ioports also shows the second card correctly. I can MAKEDEV the ttyS4 and ttyS5 devices but when I do a setserial I get a no device at address error. I have double and triple checked everything and I am using the right addresses and IRQs (IRQ 5 for the first card and IRQ 10 for the second) and there are no IRQ conflicts and the right port addresses. Both cards are workign as I can install each individually and they work fine. BIOS settings are the same as they were under RHEL3 when it all worked.

Any ideas?
Reply With Quote
  #2  
Old 2006-05-04, 10:12 AM CDT
BlueDevil Offline type=text/javascript> vbmenu_register("postmenu_521093", true);
Registered User
 
Join Date: May 2006
Posts: 4
OK no replies so let me ask another question: does anyone have more than 4 serial ports working under FC5?
Reply With Quote
  #3  
Old 2006-05-09, 04:44 PM CDT
fjca Offline type=text/javascript> vbmenu_register("postmenu_524997", true);
Registered User
 
Join Date: Mar 2005
Posts: 2
Quote:
Originally Posted by BlueDevil
OK no replies so let me ask another question: does anyone have more than 4 serial ports working under FC5?
I haven't tested this yet, but the problem seems to be a new kernel config option,
CONFIG_SERIAL_8250_RUNTIME_UARTS, which is set to 4 on the FC5 kernel.
The old parameter, CONFIG_SERIAL_8250_NR_UARTS, that defines the maximum
number of ports, is set to 32 on the kernel, so unless you need more than 32 ports,
there is no need to do a recompile.

To have more than 4, you must pass a kernel option on boot, 8250.nr_uarts=X.
If you're using grub, just append that to the "kernel" line, something like this:

kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 8250.nr_uarts=8

Now reboot, and do a 'cat /proc/tty/driver/serial'. It should list 8 ports, this is
what looks like on my vmware-fc5 setup:

[root@vmfc5 etc]# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 CTS|DSR|CD
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 CTS|DSR|CD
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
[root@vmfc5 etc]#


On your machine it should list your real serial port settings...
There is also a setting if you're using serial support as a module (NOT the
FC5 default), which is nr_uarts. Something like "insmod serial nr_uarts=8".

The original LKML thread on which this is discussed is here

Hope this helps,
Reply With Quote
  #4  
Old 2006-05-16, 02:09 PM CDT
Paavo Offline type=text/javascript> vbmenu_register("postmenu_529825", true);
Registered User
 
Join Date: May 2006
Posts: 17
Thanks fjca, 8250.nr_uarts=16 fixed it for me, I have Titan Electronics 8-port card.
Reply With Quote
  #5  
Old 2006-11-17, 04:13 PM CST
zqzq Offline type=text/javascript> vbmenu_register("postmenu_681902", true);
Registered User
 
Join Date: Oct 2005
Posts: 3
Quote:
Originally Posted by fjca
I haven't tested this yet, but the problem seems to be a new kernel config option,
CONFIG_SERIAL_8250_RUNTIME_UARTS, which is set to 4 on the FC5 kernel.
The old parameter, CONFIG_SERIAL_8250_NR_UARTS, that defines the maximum
number of ports, is set to 32 on the kernel, so unless you need more than 32 ports,
there is no need to do a recompile.

To have more than 4, you must pass a kernel option on boot, 8250.nr_uarts=X.
If you're using grub, just append that to the "kernel" line, something like this:

kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 8250.nr_uarts=8

Now reboot, and do a 'cat /proc/tty/driver/serial'. It should list 8 ports, this is
what looks like on my vmware-fc5 setup:

[root@vmfc5 etc]# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 CTS|DSR|CD
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 CTS|DSR|CD
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
[root@vmfc5 etc]#


On your machine it should list your real serial port settings...
There is also a setting if you're using serial support as a module (NOT the
FC5 default), which is nr_uarts. Something like "insmod serial nr_uarts=8".

The original LKML thread on which this is discussed is here

Hope this helps,
i have same problem but i'm new in linux

what i need to do ?
do i need to change the line -
CONFIG_SERIAL_8250_RUNTIME_UARTS = 4
to
CONFIG_SERIAL_8250_RUNTIME_UARTS = 8
?

and when i type -

kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 8250.nr_uarts=8
what should i write instead of "=LABEL=" ?

many thanx
Reply With Quote
  #6  
Old 2006-11-18, 05:30 AM CST
fjca Offline type=text/javascript> vbmenu_register("postmenu_682349", true);
Registered User
 
Join Date: Mar 2005
Posts: 2
Post

You don't have to recompile the kernel, just edit the file /boot/grub/grub.conf
and add "8250.nr_uarts=8" to the end of kernel line.

This a example from a FC5 grub.conf file:

kernel /boot/vmlinuz-2.6.18-1.2200.fc5 ro root=LABEL=/

And then you add the 8250.nr_uarts=8 statement:

kernel /boot/vmlinuz-2.6.18-1.2200.fc5 ro root=LABEL=/ 8250.nr_uarts=8

That's it. Just remember that you must check the /boot/grub/grub.conf file
every time you update a kernel...
Reply With Quote
  #7  
Old 2006-11-18, 05:48 AM CST
zqzq Offline type=text/javascript> vbmenu_register("postmenu_682356", true);
Registered User
 
Join Date: Oct 2005
Posts: 3
ohhh...
now its clear ! i will try that !

many many manu thanx !!!!!!!!!!!
Reply With Quote
  #8  
Old 2006-11-19, 02:52 AM CST
zqzq Offline type=text/javascript> vbmenu_register("postmenu_683331", true);
Registered User
 
Join Date: Oct 2005
Posts: 3
all working now

tnx

Last edited by zqzq; 2006-11-19 at 04:48 AM CST.

文章评论0条评论)

登录后参与讨论
我要评论
0
10
关闭 站长推荐上一条 /2 下一条