Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353558 - sys-kernel/gentoo-sources-2.6.36-r5: PS2-Keyboard and Mouse (i8042) is not working at Pegasos
Summary: sys-kernel/gentoo-sources-2.6.36-r5: PS2-Keyboard and Mouse (i8042) is not wo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: High major (vote)
Assignee: PPC Porters
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard: watch-linux-bugzilla
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2011-02-02 21:38 UTC by Johannes Geiss
Modified: 2013-11-18 11:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel config file (.config,56.67 KB, text/plain)
2011-02-02 21:42 UTC, Johannes Geiss
Details
autoloaded modules (kernel-2.6,413 bytes, text/plain)
2011-02-02 21:43 UTC, Johannes Geiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Geiss 2011-02-02 21:38:44 UTC
The module i8042 fails on Pegasos:
request_irq(I8042_AUX_IRQ, i8042_aux_test_irq, IRQF_SHARED, "i8042", i8042_platform_device) fails.
Same with keyboard.

It doesn't matter whether to compile i8042 into kernel or as loadable module.
Comment 1 Johannes Geiss 2011-02-02 21:39:50 UTC
Steps To Reproduce (via ssh or USB keyboard):

modprobe i8042 debug
dmesg

output:

drivers/input/serio/i8042.c: 24 <- i8042 (flush, kbd) [0]
drivers/input/serio/i8042.c: aa -> i8042 (command) [0]
drivers/input/serio/i8042.c: 55 <- i8042 (return) [0]
drivers/input/serio/i8042.c: 20 -> i8042 (command) [0]
drivers/input/serio/i8042.c: 44 <- i8042 (return) [0]
drivers/input/serio/i8042.c: 20 -> i8042 (command) [0]
drivers/input/serio/i8042.c: 44 <- i8042 (return) [0]
drivers/input/serio/i8042.c: 60 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 54 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 5a -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: 5a <- i8042 (return) [1]
drivers/input/serio/i8042.c: a7 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 20 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 74 <- i8042 (return) [1]
drivers/input/serio/i8042.c: a8 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 20 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 54 <- i8042 (return) [1]
drivers/input/serio/i8042.c: 60 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 74 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [1]
drivers/input/serio/i8042.c: f0 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: f0 <- i8042 (return) [1]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 56 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: 56 <- i8042 (return) [1]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [1]
drivers/input/serio/i8042.c: a4 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: a4 <- i8042 (return) [1]
drivers/input/serio/i8042.c: 60 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 74 -> i8042 (parameter) [1]
drivers/input/serio/i8042.c: aa -> i8042 (command) [1]
drivers/input/serio/i8042.c: 55 <- i8042 (return) [1]
drivers/input/serio/i8042.c: 60 -> i8042 (command) [1]
drivers/input/serio/i8042.c: 44 -> i8042 (parameter) [1]
i8042: probe of i8042 failed with error -22
Comment 2 Johannes Geiss 2011-02-02 21:40:27 UTC
Portage 2.1.9.25 (default/linux/powerpc/ppc32/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.32-gentoo-r20-polaris ppc)
=================================================================
System uname: Linux-2.6.32-gentoo-r20-polaris-ppc-7447-7457,_altivec_supported-with-gentoo-1.12.14
Timestamp of tree: Mon, 31 Jan 2011 06:45:01 +0000
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.6.6-r1, 3.1.2-r4
dev-util/cmake: 2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.65-r1
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 3.4.6-r2, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.10
sys-devel/make: 3.81-r2
virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -fno-strict-aliasing -fomit-frame-pointer -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -fno-strict-aliasing -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --nospinner --quiet-build --usepkg --binpkg-respect-use=y"
FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ [^] ftp://de-mirror.org/distro/gentoo/ [^] "
LANG="en_US.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" [^]
USE="X Xaw3d a52 aac acl alsa altivec bluetooth branding bzip2 cairo cdr cgi cjk cli consolekit cracklib crypt css cups cxx dbus device-mapper dri dts dvd dvdr dvi emboss encode esd exif extensions extras fam fastcgi fat ffmpeg firefox flac fontconfig fortran fuse gd gdbm gdu gif gnutls gpm gtk hfs iconv icu id3tag imagemagick ipv6 jfs joystick jpeg kpathsea lcms ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap mule musicbrainz mysql ncurses nls nptl nptlonly nsplugin ntfs objc ogg opengl openmp pam pango pcre pdf perl png policykit ppc ppds pppd python qt3support qt4 readline reflection reiserfs sasl sdl server session spell spl sqlite srt ssl startup-notification stream svg sysfs tagwriting tcpd theora tiff timidity truetype twolame udev unicode usb vamp videos vorbis xcb xfce xfs xml xorg xulrunner xv xvid zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Johannes Geiss 2011-02-02 21:42:34 UTC
Created attachment 261381 [details]
Kernel config file
Comment 4 Johannes Geiss 2011-02-02 21:43:29 UTC
Created attachment 261382 [details]
autoloaded modules
Comment 5 Johannes Geiss 2011-02-02 21:44:41 UTC
gentoo-sources-2.6.32-r20 works fine.
Comment 6 Johannes Geiss 2011-02-26 10:11:36 UTC
Same problem with 2.6.37
Comment 7 Joe Jezak (RETIRED) gentoo-dev 2011-03-03 14:10:12 UTC
Can you please try with a vanilla kernel? If that doesn't help, can you do a git bisect so we can figure out which change broke it?

http://www.reactivated.net/weblog/archives/2006/01/using-git-bisect-to-find-buggy-kernel-patches/

Thanks!
Comment 8 Johannes Geiss 2011-03-06 06:46:15 UTC
(In reply to comment #7)
> Can you please try with a vanilla kernel? 

Vanilla kernel also fails.

> If that doesn't help, can you do a
> git bisect so we can figure out which change broke it?

I did this. The patch which introduced the problem is

540c6c392f01887dcc96bef0a41e63e6c1334f01 is the first bad commit
commit 540c6c392f01887dcc96bef0a41e63e6c1334f01
Author: Martyn Welch <martyn.welch@ge.com>
Date:   Mon May 24 22:09:16 2010 +0000

    powerpc: Add i8042 keyboard and mouse irq parsing

    Currently the irqs for the i8042, which historically provides keyboard and
    mouse (aux) support, is hardwired in the driver rather than parsing the
    dts.  This patch modifies the powerpc legacy IO code to attempt to parse
    the device tree for this information, failing back to the hardcoded values
    if it fails.

    Signed-off-by: Martyn Welch <martyn.welch@ge.com>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

:040000 040000 197d8bb98091734fdaefaebefb72da247fea9f56 5dca835075e25534d7437cd417c9d823aec87112 M      arch
:040000 040000 b2b888744a99df78ee803094f43551130ee3febf 154ef6adc94722c907ff0562f068c54fcd602fdc M      drivers


Furthermore I filed this bug in https://bugzilla.kernel.org/show_bug.cgi?id=30002 too.
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-16 15:53:30 UTC
Thank you for bisecting the bad commit.

That is this commit:

http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=540c6c392f01887dcc96bef0a41e63e6c1334f01

Guess you can temporarily replace irq_of_parse_and_map(parent, 0) by 1 and irq_of_parse_and_map(parent, 1) by 12.

If you need help with patching it then feel free to let us know.

We're tracking upstream on this. Our CC at upstream might have brought attention to the bug; if not, I suggest you to poke it again in a week or so and later try to contact the kernel mailing list hoping people jump on the problem there. If all else fails two weeks to a month of now, feel free to ping us and / or reopen this bug so we can consider patching this in genpatches.

Though we need to be careful not to break it for others doing so...
Comment 10 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-18 11:20:49 UTC
And ... code fix upstream. :)