Problems with serial_cs

Russell King rmk+pcmcia at
Thu Jul 8 15:11:41 EDT 2004

There's several reports recently in the kernel bugzilla concerning
serial devices using serial_cs with 2.6 kernels.  Looking at a
recent /etc/pcmcia/serial, the reason becomes clear.  Here is
a section from the version in pcmcia-cs-3.2.5:

# Newer kernels deprecate use of "cua" devices, but we need to
# keep track of them anyway, if the device files are present
NR=`expr $MINOR - 64`
if [ -c /dev/cua1 ] ; then

case "$ACTION" in

    [ -n "$VERBOSE" -a -n "$INFO" ] && echo "$INFO"
    if [ ! -c /dev/$DEVICE ] ; then
	cd /dev ; log ./MAKEDEV $DEVICE
    if [ -n "$LINK" ] ; then
	if [ -L $LINK ] ; then rm $LINK ; fi
	if match `uname -r` "2.[2345].*" ; then
	    ln -s /dev/$DEVICE $LINK
	    ln -s /dev/$CALLOUT $LINK
    if [ -x /bin/setserial ] ; then
	# Workaround for serial driver bug
	IRQ=`setserial /dev/$DEVICE | sed -e 's/.*IRQ: //'`
	setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ
	if [ -n "$SERIAL_OPTS" ] ; then
	    log setserial /dev/$DEVICE $SERIAL_OPTS
    if [ -n "$INITTAB" ] ; then
	echo "S$NR:12345:respawn:$INITTAB $DEVICE" >> /etc/inittab
	telinit q
    start_fn $DEVICE

The problem is the callout device.  In 2.6 kernels, /dev/cua* devices
may exist in the namespace, but the kernel certainly does not support
any "callout" devices.

With the above, it means that if /dev/cua1 exists as a character
device (irrespective of whether there is a driver for it) we will
link /dev/cuaX to /dev/modem.

The result is that users whinge that their modem applications can't
talk to the modem via /dev/modem.

Dave - could we get this script fixed so it doesn't try to use
/dev/cua* with 2.6 kernels please?  The same is also true of some
2.5 kernels, though we don't particularly care about those.


Russell King
 Linux kernel    2.6 ARM Linux   -
 maintainer of:  2.6 PCMCIA      -
                 2.6 Serial core

More information about the linux-pcmcia mailing list