Skip to contentSkip to conversation

Linux Serial Code Problems

DISCUSSION Roger Davis 3 participants 3 messages Sep 5, 2013 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

On Mon, Sep 02, 2013 at 06:14:30PM -0500, Roger Davis wrote:
I have been pursuing a serial port problem for over a year, using Ubuntu 12.04. I reported it on 2012-12-07, and the bug was confirmed soon after that. I'm not sure if the root cause is in the basic Linux kernel, or if it is only in Ubuntu. Others are having problems with similar modems.

The exact same computer and modem (USR 5610C, PCI, 16550 chip, Linux compatible, http://www.usr.com/products/modem/modem-comparison.asp , with integral controller and serial port, NOT a Wimmodem ) works just fine in Windoze. I switch OS's by hardwire switches in removable drive trays, so it is really the exact very same computer, not just another one of the same spec.

The serial port ttyS4 seems to be detected, but yet not detected, and not usable by the modem. IRQ 17 also seems to behave oddly. I suspect that internal modems with both controller and integral serial ports have been kinda "overlooked" during coding, so the code gets confused and stumbles?

There has been no fix action since I reported it, and the bug is still unassigned.

Please see confirmed bug " https://bugs.launchpad.net/ubuntu/+bug/1087519 " for much more details.

maintainer
#1 lore raw
Quoted 5 lines · Roger Davis

On Mon, Sep 02, 2013 at 06:14:30PM -0500, Roger Davis wrote:
I have been pursuing a serial port problem for over a year, using Ubuntu 12.04. I reported it on 2012-12-07, and the bug was confirmed soon after that. I'm not sure if the root cause is in the basic Linux kernel, or if it is only in Ubuntu. Others are having problems with similar modems.

As this used to work on older kernels, and not on newer ones, is there any way you can:
- first ensure this is still a problem on 3.11
- if that fails, use 'git bisect' to find the offending patch?

thanks,

greg k-h

#2 lore raw
In reply to Roger Davis

I haven't been the serial driver maintainer in many years, but here are some quick tips.

1) I prefer using c-kermit to debug serial problems. That's because it doesn't do anything automatically. You manually set the baud rate, enable disable flow control, etc., using simple comamands. I don't like programs which automatically try to dial, or automatically try to "configure the modem" etc., because that just confuses things. C-kernel doesn't do any of this. You can configure the modem yourself, using AT commands. And when you are debugging, that's actually preferred.

2) The serial driver registeres the irq only when the tty is open, and it drops the irq when the last file descriptor to the tty is closed. This is a throwback to the ISA bus days, when there were limited number of irq ports available, and various serial cards had hacks to try to allow serial ports to share irq channels. So don't use /proc/interrupts to see if the irq was properly gathered. Instead use /proc/tty/driver/serial (or the setserial program) to see what port and irq were assgiend.

3) If you can boot the older version of Ubuntu where the serial driver worked, check the port and irq that was detected when it wored, and compare it to a newer kernel in /proc/tty/driver/serial. It may be that the port and irq isn't properly getting configured.

4) The fact that the UART was automatically detected seems to indicate that the port is correct and there is a UART answering. What I would suspect is either (a) there is some kind of interrupt set up problem, or (b) there is some magic ACPI hack which Windows knows about but we don't in Linux which is required to power up the modem board fully --- this could be some weird power management thing...

Good luck, and I hope some of this is helpful,

- Ted