<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>138036</bug_id>
          
          <creation_ts>2006-06-26 05:09 0000</creation_ts>
          <short_desc>&gt;=gentoo-sources-2.6.16-r9 - SATA_VIA causes Kernel panic</short_desc>
          <delta_ts>2006-08-11 11:17:07 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>2005.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>aiko@chroot.de</reporter>
          <assigned_to>dsd@gentoo.org</assigned_to>
          <cc>kernel@gentoo.org</cc>
    
    <cc>sergio@sergiomb.no-ip.org</cc>

      

      
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-06-26 05:09:38 0000</bug_when>
            <thetext>- 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-06-26 05:09:38 0000</bug_when>
            <thetext>- 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=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i386-pc-linux-gnu&quot;
CFLAGS=&quot;-march=i686 -msse -mmmx -mfpmath=sse,387 -Os -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i386-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/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/&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo&quot;
CXXFLAGS=&quot;-march=i686 -msse -mmmx -mfpmath=sse,387 -Os -pipe -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
LANG=&quot;en_US&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --
stats --timeout=180 --exclude=&apos;/distfiles&apos; --exclude=&apos;/local&apos; --exclude=&apos;/packages&apos;&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;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&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERL
AY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-01 09:54:45 0000</bug_when>
            <thetext>Pretty sure this is a result of the VIA IRQ fixup patches in 2.6.16.17</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-02 02:02:27 0000</bug_when>
            <thetext>Please post &quot;lspci -n&quot; output</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-07-02 23:23:15 0000</bug_when>
            <thetext>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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-04 07:15:11 0000</bug_when>
            <thetext>Please attach dmesg from broken and working kernels</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-07-12 02:04:23 0000</bug_when>
            <thetext>I build a new kernel: 2.6.17-gentoo-r2

Booting normal:
- http://files.haeckser.net/bugs.gentoo.org/dmesg/dmesg-acpi-on-1.jpg
- http://files.haeckser.net/bugs.gentoo.org/dmesg/dmesg-acpi-on-2.jpg
Booting with acpi=off:
- http://files.haeckser.net/bugs.gentoo.org/dmesg/dmesg-acpi-off.txt
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-13 04:30:10 0000</bug_when>
            <thetext>And from gentoo-sources-2.6.16-r6, please.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-07-13 05:42:21 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; And from gentoo-sources-2.6.16-r6, please.

http://files.haeckser.net/bugs.gentoo.org/dmesg/dmesg-2.6.16-gentoo-r6.txt</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-13 11:48:42 0000</bug_when>
            <thetext>Created an attachment (id=91653)
patch

Please try this patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@solvik.se</who>
            <bug_when>2006-07-14 02:27:20 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; Created an attachment (id=91653) [edit]
&gt; patch
&gt; 
&gt; Please try this patch
Kernels that hung on sata_via before load perfectly with this patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-14 02:53:50 0000</bug_when>
            <thetext>Thanks for testing, sent it upstream...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-07-14 03:12:29 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; Created an attachment (id=91653) [edit]
&gt; patch
&gt; 
&gt; Please try this patch

This patch does its job correctly. Thnx!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sergio@sergiomb.no-ip.org</who>
            <bug_when>2006-07-14 08:05:11 0000</bug_when>
            <thetext>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 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-14 08:23:15 0000</bug_when>
            <thetext>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&amp;r=1&amp;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).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sergio@sergiomb.no-ip.org</who>
            <bug_when>2006-07-14 08:34:32 0000</bug_when>
            <thetext>
&gt; 
&gt; Anyway, on my system they are IO-APIC, but they become XT-PIC when I disable
&gt; APIC support in the kernel. I run with APIC support disabled most of the time
&gt; (buggy bios, I actually have to force it on if I want it).
&gt; 

so , has I suspect,  you just need the quirk if it runs on XT-PIC mode.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-07-23 16:00:21 0000</bug_when>
            <thetext>Fixed in gentoo-sources-2.6.17-r4</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-08-11 10:37:46 0000</bug_when>
            <thetext>We&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aiko@chroot.de</who>
            <bug_when>2006-08-11 11:17:07 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>91653</attachid>
            <date>2006-07-13 11:48 0000</date>
            <desc>patch</desc>
            <filename>via-irq-fixup-sata.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGxpbnV4L2RyaXZlcnMvcGNpL3F1aXJrcy5jCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGxpbnV4Lm9y
aWcvZHJpdmVycy9wY2kvcXVpcmtzLmMKKysrIGxpbnV4L2RyaXZlcnMvcGNpL3F1aXJrcy5jCkBA
IC02NjgsNiArNjY4LDcgQEAgREVDTEFSRV9QQ0lfRklYVVBfRU5BQkxFKFBDSV9WRU5ET1JfSURf
VgogREVDTEFSRV9QQ0lfRklYVVBfRU5BQkxFKFBDSV9WRU5ET1JfSURfVklBLCBQQ0lfREVWSUNF
X0lEX1ZJQV84MkM2ODYsIHF1aXJrX3ZpYV9pcnEpOwogREVDTEFSRV9QQ0lfRklYVVBfRU5BQkxF
KFBDSV9WRU5ET1JfSURfVklBLCBQQ0lfREVWSUNFX0lEX1ZJQV84MkM2ODZfNCwgcXVpcmtfdmlh
X2lycSk7CiBERUNMQVJFX1BDSV9GSVhVUF9FTkFCTEUoUENJX1ZFTkRPUl9JRF9WSUEsIFBDSV9E
RVZJQ0VfSURfVklBXzgyQzY4Nl81LCBxdWlya192aWFfaXJxKTsKK0RFQ0xBUkVfUENJX0ZJWFVQ
X0VOQUJMRShQQ0lfVkVORE9SX0lEX1ZJQSwgUENJX0RFVklDRV9JRF9WSUFfODIzN19TQVRBLCBx
dWlya192aWFfaXJxKTsKIAogLyoKICAqIFZJQSBWVDgyQzU5OCBoYXMgaXRzIGRldmljZSBJRCBz
ZXR0YWJsZSBhbmQgbWFueSBCSU9TZXMK
</data>        

          </attachment>
    </bug>

</bugzilla>