Skip to contentSkip to conversation

devfs + PCI serial card = no extra serial ports

DISCUSSION Adam J. Richter 2 participants 2 messages Mar 14, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Ed Vance

The largest gotcha that I am aware of for the PCI/setserial command combination is the inability to automatically "follow" the card when its address changes due to adding or removing an unrelated PCI device. Even so, the system is unlikely to crash because the driver checks the LSR register for impossible values and cuts off access when the UART is not present.

I would expect that setserial should only be used in cases
where this information is not reliably determinable by the kernel through hardware device ID facilities, such as what we have in PCI, USB, etc. If that is not already the case, it should be straightforward to fix in the kernel sources, which seemed to be most of what the "3 Serial issues up for discussion" thread was about (thanks for the pointer). There was tangential mention in that thread of a "/proc/serialdev" interface, but nobody really identified any real benefit to it over the existing "uart: unknown" system.

Anyhow, my primary point in this discussion is just to say
that, as far as I can tell, devfs does not impede the serial driver from doing what Ted Ts'o seemed to be describing.

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw
Quoted 3 lines · Adam J. Richter

There was tangential mention in that thread
of a "/proc/serialdev" interface, but nobody really identified any real benefit to it over the existing "uart: unknown" system.

There is one benefit, which would be to get rid of some of the yucky mess we currently have surrounding the implementation of stuff which changes the port base address/irq.

Currently, we have to check that we're the only user, shutdown, tweak stuff, hope it all goes to plan, and start stuff back up again. If something fails, we have to pray we can go back to the original setup without stuff breaking. If that fails, we mark the port "unknown".

All of this would be a lot simpler if we didn't have the port actually open at the time we change these parameters. We could just lock the port against opens, check no one was using it, tweak the settings, and release the port. If the changes fail, just report the failure.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html