Bug 8458
Summary: | setserial fails to set ttyS[4-9] (invalid argument) | ||
---|---|---|---|
Product: | Drivers | Reporter: | David L (idht4n) |
Component: | Serial | Assignee: | Russell King (rmk) |
Status: | REJECTED DOCUMENTED | ||
Severity: | normal | CC: | bunk, hthomas, protasnb |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.13 and newer | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
David L
2007-05-09 08:14:12 UTC
Try also specifying a baud_base. setting baud_base seemed to work. I haven't been able to verify successful communication, but setserial no longer fails: # /bin/setserial /dev/ttyS4 port 0x300 irq 4 uart 16550A ^fourport low_latency Cannot set serial info: Invalid argument # /bin/setserial /dev/ttyS4 port 0x300 irq 4 uart 16550A ^fourport low_latency baud_base 1843200 # cat /proc/tty/driver/serial |head -8 serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 2: uart:16550A port:000003E8 irq:4 tx:0 rx:0 CTS|DSR 3: uart:16550A port:000002E8 irq:3 tx:0 rx:0 4: uart:16550A port:00000300 irq:4 tx:0 rx:0 CTS|DSR It looks like this bug can be closed. (In reply to comment #3) > It looks like this bug can be closed. I ran into a similar set of issues trying to get new serial ports installed into an embedded x86 application. The issue for me turned out to be that the setserial program converts its command line arguments, in order, into corresponding ioctl() operations to set the various device parameters. Basically, setserial applied a strategy of: 1)read the current setting for the specific /dev/ttySx 2)modify the values as specifid by each command line arg, with each individual command line argument or flag turning into an ioctl So, specifying the uart type (or autoconfigure) before you specify the port or irq won't work correctly for ports greater the /dev/ttyS3, because the port value for /dev/ttyS3 isn't initialized to anything. This causes the ioctl() operation to return with errno set to EINVAL (invalid argument). I suspect the chain of ioctl()'s that ^fourport flag followed by low_latency flag turn into something that doesn't make sense to the driver. |