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

Bug 138036

Summary: >=gentoo-sources-2.6.16-r9 - SATA_VIA causes Kernel panic
Product: Gentoo Linux Reporter: Aiko Barz <aiko>
Component: [OLD] Core systemAssignee: Daniel Drake (RETIRED) <dsd>
Status: RESOLVED FIXED    
Severity: major CC: kernel, sergio
Priority: Normal    
Version: 2005.1   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch

Description Aiko Barz 2006-06-26 05:09:38 UTC
- gentoo-sources-2.6.16-r6 is working fine
- gentoo-sources-2.6.16-r9 is broken
- gentoo-sources-2.6.17 is broken

Booting the last 2 kernels ends up with:
ata1: qc timeout (cmd 0xef)
ata1: failed to set xfermode (err_mask=0
Comment 1 Aiko Barz 2006-06-26 05:09:38 UTC
- gentoo-sources-2.6.16-r6 is working fine
- gentoo-sources-2.6.16-r9 is broken
- gentoo-sources-2.6.17 is broken

Booting the last 2 kernels ends up with:
ata1: qc timeout (cmd 0xef)
ata1: failed to set xfermode (err_mask=0×4)

Disabling the ACPI support fixes the problem at the moment.

lspci:
00:00.0 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:00.1 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:00.2 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:00.3 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:00.4 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:00.7 Host bridge: VIA Technologies, Inc. CN400/PM880 Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
00:0d.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)
00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 02)

merge --info:
Gentoo Base System version 1.6.14
Portage 2.1-r1 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-kodoma i686)
=================================================================
System uname: 2.6.17-gentoo-kodoma i686 VIA Nehemiah
dev-lang/python:     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-r1
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-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-march=i686 -msse -mmmx -mfpmath=sse,387 -Os -pipe -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=i686 -msse -mmmx -mfpmath=sse,387 -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts cli crypt dri eds emboss encode foomaticdb fortran gdbm 
gif gnome gstreamer gtk2 hardened imlib ipv6 isdnlog jpeg kde ldap libg++ libwww mad mikmod mmx motif mp3 mpeg mpm-worker nagio
s-dns nagios-ping nagios-ssh ncurses nls nptl nptlonly ogg oggvorbis opengl oss pcre pdflib perl pic png pppd python qt quickti
me readline reflection session spell spl ssl tcpd threads truetype truetype-fonts type1-fonts vorbis xml2 xmms xorg xv zlib eli
bc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERL
AY
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-07-01 09:54:45 UTC
Pretty sure this is a result of the VIA IRQ fixup patches in 2.6.16.17
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-07-02 02:02:27 UTC
Please post "lspci -n" output
Comment 4 Aiko Barz 2006-07-02 23:23:15 UTC
kodoma bin # lspci -n
00:00.0 0600: 1106:0259
00:00.1 0600: 1106:1259
00:00.2 0600: 1106:2259
00:00.3 0600: 1106:3259
00:00.4 0600: 1106:4259
00:00.7 0600: 1106:7259
00:01.0 0604: 1106:b198
00:0d.0 0c00: 1106:3044 (rev 80)
00:0f.0 0101: 1106:3149 (rev 80)
00:10.0 0c03: 1106:3038 (rev 81)
00:10.1 0c03: 1106:3038 (rev 81)
00:10.2 0c03: 1106:3038 (rev 81)
00:10.3 0c03: 1106:3038 (rev 81)
00:10.4 0c03: 1106:3104 (rev 86)
00:11.0 0601: 1106:3227
00:12.0 0200: 1106:3065 (rev 78)
01:00.0 0300: 1106:3118 (rev 02)
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-07-04 07:15:11 UTC
Please attach dmesg from broken and working kernels
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-07-13 04:30:10 UTC
And from gentoo-sources-2.6.16-r6, please.
Comment 8 Aiko Barz 2006-07-13 05:42:21 UTC
(In reply to comment #6)
> And from gentoo-sources-2.6.16-r6, please.

http://files.haeckser.net/bugs.gentoo.org/dmesg/dmesg-2.6.16-gentoo-r6.txt
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2006-07-13 11:48:42 UTC
Created attachment 91653 [details, diff]
patch

Please try this patch
Comment 10 Peter Kling 2006-07-14 02:27:20 UTC
(In reply to comment #8)
> Created an attachment (id=91653) [edit]
> patch
> 
> Please try this patch
Kernels that hung on sata_via before load perfectly with this patch
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-07-14 02:53:50 UTC
Thanks for testing, sent it upstream...
Comment 12 Aiko Barz 2006-07-14 03:12:29 UTC
(In reply to comment #8)
> Created an attachment (id=91653) [edit]
> patch
> 
> Please try this patch

This patch does its job correctly. Thnx!
Comment 13 sergio 2006-07-14 08:05:11 UTC
cat /proc/interrupts
give you IO-APIC-edge/level or XT-PIC ? 
Andy Morton revert this originals patch from -DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
to 
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);

I need to know in interrupts are triggred on IO-APICs or not , run in XT-PIC 
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2006-07-14 08:23:15 UTC
Why is that relevant?

The patch here works, but we are discussing whether this kind of solution is acceptable at http://marc.theaimsgroup.com/?t=115287083500003&r=1&w=2

Anyway, on my system they are IO-APIC, but they become XT-PIC when I disable APIC support in the kernel. I run with APIC support disabled most of the time (buggy bios, I actually have to force it on if I want it).
Comment 15 sergio 2006-07-14 08:34:32 UTC
> 
> Anyway, on my system they are IO-APIC, but they become XT-PIC when I disable
> APIC support in the kernel. I run with APIC support disabled most of the time
> (buggy bios, I actually have to force it on if I want it).
> 

so , has I suspect,  you just need the quirk if it runs on XT-PIC mode.
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2006-07-23 16:00:21 UTC
Fixed in gentoo-sources-2.6.17-r4
Comment 17 Daniel Drake (RETIRED) gentoo-dev 2006-08-11 10:37:46 UTC
We're still discussing the best way to fix this bug properly. To help us clear up some points, please attach /proc/interrupts from any working kernel.
Comment 18 Aiko Barz 2006-08-11 11:17:07 UTC
kodoma src # cat /proc/interrupts
           CPU0
  0:  247627449          XT-PIC  timer
  2:          0          XT-PIC  cascade
  8:          2          XT-PIC  rtc
  9:          0          XT-PIC  acpi
 10:    1258181          XT-PIC  libata
 11:    8614267          XT-PIC  eth0
NMI:          0
LOC:          0
ERR:          0
MIS:          0

kodoma src # uname -a
Linux kodoma 2.6.17-gentoo-r4-kodoma #1 Tue Jul 25 10:32:10 CEST 2006 i686 VIA Nehemiah GNU/Linux

kodoma src # cat /proc/cmdline
root=/dev/sda2