Problems with serial_cs

Russell King rmk+pcmcia at arm.linux.org.uk
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
    CALLOUT=cua$NR
else
    CALLOUT=$DEVICE
fi

case "$ACTION" in

'start')
    [ -n "$VERBOSE" -a -n "$INFO" ] && echo "$INFO"
    if [ ! -c /dev/$DEVICE ] ; then
	cd /dev ; log ./MAKEDEV $DEVICE
    fi
    if [ -n "$LINK" ] ; then
	if [ -L $LINK ] ; then rm $LINK ; fi
	if match `uname -r` "2.[2345].*" ; then
	    ln -s /dev/$DEVICE $LINK
	else
	    ln -s /dev/$CALLOUT $LINK
	fi
    fi
    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
	fi
    fi
    if [ -n "$INITTAB" ] ; then
	echo "S$NR:12345:respawn:$INITTAB $DEVICE" >> /etc/inittab
	telinit q
    fi
    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.

Thanks.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core



More information about the linux-pcmcia mailing list