Messages in this thread | | | Date | Mon, 31 May 1999 14:12:50 -0400 (EDT) | From | "Theodore Y. Ts'o" <> | Subject | Re: Hard coding default COM3/4 IRQ. |
| |
Date: Mon, 31 May 1999 23:33:30 +1000 From: Richard Gooch <rgooch@atnf.csiro.au>
Does this also mean that auto IRQ detection using setserial is not reliable?
For some systems, yes, if the boot-time configuration is not realible, then setserial is not reliable either. This is why I recommend that folks manually specify the IRQ in /etc/serial.conf, and have /etc/rc.serial set the IRQ's appropriately from /etc/serial.conf. This is guaranteed to work, all the time.
BTW: what sort of confusion do you mean?
The problems fall into two categories. One is there are random UART's which claim to be National Semiconductor 16550A compatible, but which are really Taiwan specials that really aren't. Some of these bogus UART's don't signal an interrupt when they should, and tweaking the autoconfiguration code to handle such UART's is an exercise in frustration when (a) you don't have an example of this particular bad UART emulation (b) there is no spec sheet, and (c) even when there is a spec sheet, there's no guarantee the hardware follows it.
The other set of problems is that some random ISA hardware may signal interrupts at unexpected times, and confuse the serial driver into grabbing the wrong IRQ. This is admittedly a less common error case.
The bottom line is that ISA hardware is sh*t, and trying to make autoconfiguration work on ISA hardware is very, very, very difficult. This is especially true in the case of serial UART's, since everyone and their brother feel that they are competent to design their own National Semiconductor UART ripoff, and unfortunately many of them get it wrong.
What I found is that by assuming that the default IRQ 3 and 4 are used, I got *much* less e-mail complaints. Those who are using their own custom hardware in general are smart enough to figure out how to fix it on their own --- and the amount of requests of assistance from less experienced folks who are using the cheapest hardware they could find went a down a lot; these folks win by using the IRQ 3/4 default settings, and their cheap hardware would have lost if we tried to autodetect their IRQ and fail.
- Ted
P.S. Hmmm.... something which I might try is to do the boot-time autoconfiguration, and if it fails, fall back to setting the IRQ to the default 3/4, instead of setting the IRQ to 0. This may confuse some folks since you won't be able to distinguish between a failed IRQ autoconfiguration and an IRQ configuration that happened to choose 3/4. But it will help out the naive folks with the cheap hardware, and it will help some of the folks who have custom hardware, and are too lazy to configure their own /etc/serial.conf.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |