On 02/08/18 04:31, Захаров Анатолий wrote: > I install OpenBSD on my Fastwell CPB905 Singleboard compter. IT have > 4-RS-232 port on same IRQ, but on different address on isa bus. Then i > setup only one port using configure command all ports work normally. But > when i setup 2 of them in one boot configuration i get in dmesg: irq > already in use. I found next thing in OpenBSD 3.8. documentation: > > ISA devices can not share IRQs. If you find ISA devices sharing IRQs, you > must correct this problem. > > But how it works on Linux & QNX?
REALLY, if you have to ask such questions, you should not be using 35+ year old HW designs like ISA. The world is much simpler now, focused on a less experienced userbase. The ISA bus was designed for one device, one interrupt. The OS would install code to deal with device X on IRQ Y. When IRQ Y was detected, the code to handle device X was run and -- BY DEFINITION -- it knew it could close out the interrupt and get back to whatever else the computer was doing. The software was written that way, and the HW was designed that way -- devices could apply a logic zero or logic one to a IRQ pin. Start sharing IRQs, you could end up with one card trying to pull the pin high, another pulling it low (so even if you write fancy software that polls multiple devices sharing an IRQ, odds are, the HW won't allow it to work). Now, there are things that APPEAR to violate this one device, one interrupt rule. For example, I have a Boca 8 port serial card in a machine that has a total of ten serial ports: boca0 at isa0 port 0x100/64 irq 10 com4 at boca0 slave 0: ns16550a, 16 byte fifo com5 at boca0 slave 1: ns16550a, 16 byte fifo com6 at boca0 slave 2: ns16550a, 16 byte fifo com7 at boca0 slave 3: ns16550a, 16 byte fifo com8 at boca0 slave 4: ns16550a, 16 byte fifo com9 at boca0 slave 5: ns16550a, 16 byte fifo com10 at boca0 slave 6: ns16550a, 16 byte fifo com11 at boca0 slave 7: ns16550a, 16 byte fifo com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo In this case, the ENTIRE Boca board is ONE device sharing an IRQ, there is no violation. The drivers for it know when it gets called by an IRQ, it has to poll ALL the devices looking for something that needs to be done. It is a Boca driver (which happens to have eight ports), not a generic ISA COM port driver. Your system is most likely along these lines. Someone wrote the driver for your cluster of serial ports-as-one-device for other OSs, and you are trying to use the ISA com port driver on OpenBSD. Your options are to either write some code (hint: the boca driver might be a good starting point, but notice that it is NOT part of the base system ... for a reason! (that's a custom compiled kernel I showed a snippet of the dmesg of) Nick.