Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 143828

Summary: newer 2.6.x kernels and pcmciautils don't initialize serial port correctly
Product: Gentoo Linux Reporter: Steve Arnold <nerdboy>
Component: Current packagesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED NEEDINFO    
Severity: normal CC: mobile+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Steve Arnold archtester gentoo-dev 2006-08-13 17:19:38 UTC
This happens on an ultra-small laptop with no physical serial ports, but I suspect the behavior would be the same with any laptop using a pcmcia/cf GPS card (since the serial port doesn't exist until you plug the card in).

When I plug in the GPS card in this case, /dev/ttys0 gets created just fine, but the GPS isn't usable until the serial port gets configured by a nice setserial command.  I'm currently using:

setserial /dev/ttyS0 port 0x03f8 irq 0 autoconfig

Without the above command, there appear to be IRQ issues:

Aug  5 14:41:08 minitux 0.0: ttyS0 at I/O 0x3f8 (irq = 3) is a 16C950/954
Aug  5 14:41:12 minitux irq 3: nobody cared (try booting with the "irqpoll" option)
Aug  5 14:41:12 minitux [<c0141c3a>] __report_bad_irq+0x2a/0x90
Aug  5 14:41:12 minitux [<c01413d9>] handle_IRQ_event+0x39/0x70
Aug  5 14:41:12 minitux [<c0141d60>] note_interrupt+0xa0/0x100
Aug  5 14:41:12 minitux [<c0141508>] __do_IRQ+0xf8/0x120
Aug  5 14:41:12 minitux [<c01057c9>] do_IRQ+0x19/0x30
Aug  5 14:41:12 minitux [<c0103a92>] common_interrupt+0x1a/0x20
Aug  5 14:41:12 minitux handlers:
Aug  5 14:41:12 minitux [<c0250010>] (serial8250_interrupt+0x0/0x150)
Aug  5 14:41:12 minitux Disabling IRQ #3

Once the above setserial command is issued, gpsd (both old and new) can connect and give useful data.  Obviously the normal rc.serial thing doesn't work since the device doesn't exist until the card is plugged in, so it seems to me pcmcia should be able to handle this without user intervention.  According to google and the pcmcia docs, there are some config options that can be added to the /etc/pcmcia stuff, but it doesn't seem to work with my current configuration.  The card itself shows as "Compact Flash GENERIC" or some such, but it won't modify as per the docs either, so I'm not sure exactly what's hosed up, missing, etc.

Maybe it should have a Gentoo-ized config file, or at least an example somewhere, since it took me several hours of googling, reading, fiddling, and emerging to get this working.  I expect there are several people with more pcmcia expertise than I have (since I'm not even sure if hotplug is involved or not :) so post away, please...

sys-apps/hotplug-base - 20040401
sys-apps/hotplug - 20040923-r2
sys-apps/pcmciautils - 014
virtual/pcmcia - 2.6.13

Linux minitux 2.6.16.20 #3 SMP PREEMPT (vanilla-sources)
also 2.6.17.7 vanilla plus PPS patches

Don't mind the AMD64 stuff in the info below; it's really a Transmeta Crusoe mounted to my desktop as an exernal drive.

Portage 2.1.1_pre4 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.4-r3, 2.6.16.20 i686)
=================================================================
System uname: 2.6.16.20 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.2.3-r5, 2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distcc distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://kuroshin.arnolds.bogus/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://kuroshin.arnolds.bogus/gentoo-portage"
USE="X aalib acl acpi alsa apache2 avi bitmap-fonts bonobo bzip2 cdparanoia cdr cli crypt cups dbus dga directfb divx4linux dlloader dri dvd dvdr dvdread eds emacs emboss encode esd ethereal f77 fam fbcon flac fltk foomaticdb fortran freetype freetype2 gcj gd gdbm gif gmp gnome gnome-print gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml hal icq imagemagick imap imlib imlib2 ipv6 isdnlog jabber java jbig jpeg jpg lame lesstif libg++ libwww mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pam_console pcmcia pcmcia-cs pcre pda pdflib perl plotutils png pnp pppd python qt qt3 qt4 quicktime readline reflection sdl session slang spell spl ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vorbis wifi x86 xanim xine xml xml2 xmms xorg xv zeo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Steve Arnold archtester gentoo-dev 2006-11-14 19:12:43 UTC
No takers?
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-12-08 17:45:52 UTC
Still present in 2.6.19?
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-12-25 15:29:25 UTC
see comment #2