NetBSD Problem Report #48858

From www@NetBSD.org  Sat May 31 16:07:04 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1006AA5813
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 31 May 2014 16:07:04 +0000 (UTC)
Message-Id: <20140531160701.41270A651D@mollari.NetBSD.org>
Date: Sat, 31 May 2014 16:07:01 +0000 (UTC)
From: rcbixler@nyx.net
Reply-To: rcbixler@nyx.net
To: gnats-bugs@NetBSD.org
Subject: siside0:0:1:0: lost interrupt
X-Send-Pr-Version: www-1.0

>Number:         48858
>Category:       kern
>Synopsis:       siside0:0:1:0: lost interrupt
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 31 16:10:00 +0000 2014
>Last-Modified:  Sun Oct 11 16:00:00 +0000 2015
>Originator:     Roy Bixler
>Release:        6.1
>Organization:
>Environment:
>Description:
While trying to install NetBSD 6.14 i386 onto an old PC with a CD-ROM, the process hangs while trying to mount the root filesystem and errors like the following appear:

siside0:0:1:0: lost interrupt
     type atapi tc_bcount: 2048 tc_skip: 0
siside0: bus master DMA error: missing interrupt, status=0x61
siside0: device timeout, c_bcount=2048, c_skip=0

If I go into the system BIOS, it reports the IDE chipset as "SiS963".

I was able to install the system with a PXE boot and here is what the "dmesg" output looks like:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.1.4 (GENERIC)
total memory = 511 MB
avail memory = 490 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
ECS M848A (5.0)
mainbus0 (root)
cpu0 at mainbus0 apid 0: AMD Athlon(tm) XP, id 0x681
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 11, 24 pins
acpi0 at mainbus0: Intel ACPICA 20110623
acpi0: X/RSDT: OemId <AMIINT,SiS740XX,00001000>, AslId <MSFT,0100000b>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
SYSR (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
npx1 at acpi0 (COPR, PNP0C04): io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
pckbc1 at acpi0 (PS2M, PNP0F03) (aux port): irq 12
pckbc2 at acpi0 (PS2K, PNP0303) (kbd port): io 0x60,0x64 irq 1
FDC0 (PNP0700) at acpi0 not configured
UAR1 (PNP0501) at acpi0 not configured
UAR2 (PNP0501) at acpi0 not configured
ECP (PNP0401) at acpi0 not configured
acpibut1 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
apm0 at acpi0: Power Management spec V1.2
attimer1: attached to pcppi1
pckbd0 at pckbc2 (kbd slot)
pckbc2: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc2 (aux slot)
pckbc2: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x1039 product 0x0746 (rev. 0x10)
agp0 at pchb0: aperture at 0xd0000000, size 0x8000000
ppb0 at pci0 dev 1 function 0: vendor 0x1039 product 0x0002 (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: vendor 0x1002 product 0x4966 (rev. 0x01)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
radeondrm0 at vga1: ATI Radeon If RV250 9000
radeondrm0: AGP at 0xd0000000 128MB
radeondrm0: Initialized radeon 1.29.0 20080613
vendor 0x1002 product 0x496e (miscellaneous display, revision 0x01) at pci1 dev 
0 function 1 not configured
pcib0 at pci0 dev 2 function 0: vendor 0x1039 product 0x0008 (rev. 0x25)
siside0 at pci0 dev 2 function 5
siside0: Silicon Integrated Systems 96X UDMA6746 IDE controller (rev. 0x00)
siside0: bus-master DMA support present
siside0: primary channel wired to compatibility mode
siside0: primary channel interrupting at ioapic0 pin 14
atabus0 at siside0 channel 0
siside0: secondary channel wired to compatibility mode
siside0: secondary channel interrupting at ioapic0 pin 15
atabus1 at siside0 channel 1
auich0 at pci0 dev 2 function 7: SiS 7012 AC-97 Audio
auich0: interrupting at ioapic0 pin 18
auich0: ac97: Avance Logic ALC655 codec; no 3D stereo
auich0: ac97: ext id 0x9c4<AC97_23,LDAC,SDAC,CDAC,SPDIF>
ohci0 at pci0 dev 3 function 0: vendor 0x1039 product 0x7001 (rev. 0x0f)
ohci0: interrupting at ioapic0 pin 20
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
ohci1 at pci0 dev 3 function 1: vendor 0x1039 product 0x7001 (rev. 0x0f)
ohci1: interrupting at ioapic0 pin 21
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
ehci0 at pci0 dev 3 function 2: vendor 0x1039 product 0x7002 (rev. 0x00)
ehci0: interrupting at ioapic0 pin 23
ehci0: EHCI version 1.0
ehci0: companion controllers, 3 ports each: ohci0 ohci1
usb2 at ehci0: USB revision 2.0
sip0 at pci0 dev 4 function 0: SiS 900 10/100 Ethernet, rev 0x91
sip0: interrupting at ioapic0 pin 19
sip0: Ethernet address 00:19:21:71:73:75
ukphy0 at sip0 phy 1: OUI 0x0002c6, model 0x0032, rev. 10
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
isapnp0 at isa0 port 0x279
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
isapnp0: no ISA Plug 'n Play devices found
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
audio0 at auich0: full duplex, playback, capture, independent
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
uhub0 at usb0: vendor 0x1039 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
uhub1 at usb1: vendor 0x1039 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
uhub2 at usb2: vendor 0x1039 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 6 ports with 6 removable, self powered
wd0 at atabus0 drive 0
wd0: <ST310210A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 9729 MB, 19767 cyl, 16 head, 63 sec, 512 bytes/sect x 19925880 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd1 at atabus0 drive 1
wd1: <WDC WD400BB-00GFA0>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 38166 MB, 77545 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(siside0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
wd1(siside0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <HP      DVD Writer 635d, 4265210056, JPS3> cdrom 
removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd2 at atabus1 drive 1
wd2: <QUANTUM FIREBALL CR8.4A>
wd2: drive supports 16-sector PIO transfers, LBA addressing
wd2: 8063 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 16514064 sectors
wd2: 32-bit data port
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
Kernelized RAIDframe activated

By comparison, I was able to install other operating systems, such as Debian GNU/Linux wheezy, OpenBSD 5.5 and FreeBSD 10, using the CD-ROM.  Here is a partial "dmesg" from FreeBSD 10:

atapci0: <SiS 962/963 WDMA2 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 2.5 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0

ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <ST310210A 3.17> ATA-4 device
ada0: Serial Number 3CM0R3P6
ada0: 66.700MB/s transfers (UDMA4, PIO 8192bytes)
ada0: 9729MB (19925880 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad0
ada1 at ata0 bus 0 scbus0 target 1 lun 0
ada1: <WDC WD400BB-00GFA0 09.01B09> ATA-5 device
ada1: Serial Number WD-WMAKA1554908
ada1: 100.000MB/s transfers (UDMA5, PIO 8192bytes)
ada1: 38166MB (78165360 512 byte sectors: 16H 255S/T 16383C)
ada1: Previously was known as ad1
ada2 at ata1 bus 0 scbus1 target 1 lun 0
ada2: <QUANTUM FIREBALL CR8.4A A5U.0200> ATA-4 device
ada2: Serial Number 928911710197
ada2: 66.700MB/s transfers (UDMA4, PIO 8192bytes)
ada2: 8063MB (16514064 512 byte sectors: 16H 63S/T 16383C)
ada2: Previously was known as ad3
cd0 at ata1 bus 0 scbus1 target 0 lun 0
cd0: <HP DVD Writer 635d JPS3> Removable CD-ROM SCSI-0 device 
cd0: Serial Number 4265210056
cd0: 66.700MB/s transfers (UDMA4, ATAPI 12bytes, PIO 65534bytes)
cd0: cd present [288725 x 2048 byte records]

Here is a "dmesg" output from OpenBSD 5.5:

pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "SiS 746 PCI" rev 0x10
sisagp0 at pchb0
agp0 at sisagp0: aperture at 0xd0000000, size 0x8000000
ppb0 at pci0 dev 1 function 0 "SiS 86C202 AGP" rev 0x00
pci1 at ppb0 bus 1

pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0x00: 746: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <ST310210A>
wd0: 16-sector PIO, LBA, 9729MB, 19925880 sectors
wd1 at pciide0 channel 0 drive 1: <WDC WD400BB-00GFA0>
wd1: 16-sector PIO, LBA, 38166MB, 78165360 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HP, DVD Writer 635d, JPS3> ATAPI 5/cdrom 
removable
wd2 at pciide0 channel 1 drive 1: <QUANTUM FIREBALL CR8.4A>
wd2: 16-sector PIO, LBA, 8063MB, 16514064 sectors
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
wd2(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 4

And finally "dmesg" output from a Knoppix Live-CD (Linux):

[    0.896228] pata_sis 0000:00:02.5: version 0.5.2
[    0.896301] pata_sis 0000:00:02.5: SiS 962/963 MuTIOL IDE UDMA133 controller
[    0.897572] scsi0 : pata_sis
[    0.897900] scsi1 : pata_sis
[    0.899036] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00 irq 14
[    0.899042] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xff08 irq 15

[    1.063598] ata1.00: FORCE: horkage modified (noncq)
[    1.063611] ata1.00: ATA-4: ST310210A, 3.17, max UDMA/66
[    1.063617] ata1.00: 19925880 sectors, multi 16: LBA 
[    1.063627] ata1.01: FORCE: horkage modified (noncq)
[    1.064735] ata1.01: ATA-5: WDC WD400BB-00GFA0, 09.01B09, max UDMA/100
[    1.064741] ata1.01: 78165360 sectors, multi 16: LBA 
[    1.076876] ata1.00: configured for UDMA/66
[    1.091287] ata1.01: configured for UDMA/100
[    1.091605] scsi 0:0:0:0: Direct-Access     ATA      ST310210A        3.17 
PQ: 0 ANSI: 5
[    1.092157] sd 0:0:0:0: [sda] 19925880 512-byte logical blocks: (10.2 
GB/9.50 GiB)
[    1.092258] sd 0:0:0:0: [sda] Write Protect is off
[    1.092264] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.092308] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.093185] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.114449]  sda: sda1
[    1.114451]  sda1: <netbsd: >
[    1.114676] scsi 0:0:1:0: Direct-Access     ATA      WDC WD400BB-00GF 09.0 
PQ: 0 ANSI: 5
[    1.115351] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.115680] sd 0:0:1:0: [sdb] 78165360 512-byte logical blocks: (40.0 
GB/37.2 GiB)
[    1.115775] sd 0:0:1:0: [sdb] Write Protect is off
[    1.115782] sd 0:0:1:0: [sdb] Mode Sense: 00 3a 00 00
[    1.115824] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.116625] sd 0:0:1:0: Attached scsi generic sg1 type 0
[    1.144345]  sdb: sdb1 sdb2
[    1.145121] sd 0:0:1:0: [sdb] Attached SCSI disk
[    1.193865] psmouse serio1: hgpk: ID: 10 00 64
[    1.283578] ata2.00: FORCE: horkage modified (noncq)
[    1.283590] ata2.00: ATAPI: HP      DVD Writer 635d, JPS3, max UDMA/66
[    1.283600] ata2.01: FORCE: horkage modified (noncq)
[    1.283826] ata2.01: ATA-4: QUANTUM FIREBALL CR8.4A, A5U.0200, max UDMA/66
[    1.283831] ata2.01: 16514064 sectors, multi 16: LBA 
[    1.296907] ata2.00: configured for UDMA/66
[    1.310393] ata2.01: configured for UDMA/66
[    1.311814] scsi 1:0:0:0: CD-ROM            HP       DVD Writer 635d  JPS3 
PQ: 0 ANSI: 5
[    1.314228] sr0: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
[    1.314235] cdrom: Uniform CD-ROM driver Revision: 3.20
[    1.314563] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    1.314913] sr 1:0:0:0: Attached scsi generic sg2 type 5
[    1.318594] scsi 1:0:1:0: Direct-Access     ATA      QUANTUM FIREBALL A5U. 
PQ: 0 ANSI: 5
[    1.319112] sd 1:0:1:0: [sdc] 16514064 512-byte logical blocks: (8.45 
GB/7.87 GiB)
[    1.319214] sd 1:0:1:0: [sdc] Write Protect is off
[    1.319220] sd 1:0:1:0: [sdc] Mode Sense: 00 3a 00 00
[    1.319265] sd 1:0:1:0: [sdc] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.320197] sd 1:0:1:0: Attached scsi generic sg3 type 0
[    1.325582]  sdc: sdc1
[    1.326195] sd 1:0:1:0: [sdc] Attached SCSI disk

It seems likely to me that the IDE chipset has some kind of hardware bug that needs to be worked around.  I tried the following kernel patch and got better results reading CD-ROM data, although I wouldn't claim that it totally fixes the problem:

--- siside.c.orig       2014-05-27 15:49:34.000000000 -0500
+++ siside.c    2014-05-27 19:21:05.000000000 -0500
@@ -158,7 +158,7 @@
        {PCI_PRODUCT_SIS_740,   0x00, 5, "740", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_741,   0x00, 5, "741", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_745,   0x00, 5, "745", SIS_TYPE_100NEW},
-       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_SOUTH},
+       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_100NEW},
        {PCI_PRODUCT_SIS_748,   0x00, 6, "748", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_750,   0x00, 6, "750", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_751,   0x00, 6, "751", SIS_TYPE_SOUTH},

If I boot my NetBSD 6.14 installation without the above kernel patch, mount the CD-ROM, and try to read data from it, generally what happens is that I get a "read error" and the operation aborts prematurely.  There is no error reported in "dmesg" output in this case.

>How-To-Repeat:

>Fix:
- Kernel patch mentioned in problem report at least mitgates the problem
- Other operating systems (FreeBSD 10, OpenBSD 5.5, Linux) seem to work fine with the CD-ROM

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48858 CVS commit: src/sys/dev/pci
Date: Sat, 31 May 2014 12:25:29 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Sat May 31 16:25:29 UTC 2014

 Modified Files:
 	src/sys/dev/pci: siside.c

 Log Message:
 PR/48858: Roy Bixler: siside0:0:1:0: lost interrupt, submitter claims this
 makes the cdrom work.


 To generate a diff of this commit:
 cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/siside.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48858
Date: Sun, 1 Jun 2014 10:41:03 -0600

 Unfortunately, I found that my patch is not a complete fix to the
 problem.  It does seem to help when I boot the system from the hard
 disk and then try to read from the CD-ROM.  However, when I use the
 patched kernel to make a new install CD-ROM and boot from it, I find
 that I am still not able to mount the installer's root filesystem.
 The symptoms are different; instead of "lost interrupts" and timeouts,
 the system immediately reports a failure to mount the root filesystem.

 I am not a device driver developer, so I don't really have the
 knowledge to try further kernel modifications.  I still have the
 impression that perhaps adding some quirk code to the driver could
 handle this issue.  For example, I note that the output from the
 Knoppix Linux dmesg output suggests that the driver initially detects
 the device as UDMA/133 but then, for some reason, downgrades it to
 UDMA/66.

 Also, if it's useful, here are the results from yet another experiment
 I did with modifying the source like this:

 --- siside.c.orig     2014-05-27 15:49:34.000000000 -0500
 +++ siside.c    2014-06-01 10:27:20.000000000 -0500
 @@ -158,7 +158,7 @@
         {PCI_PRODUCT_SIS_740,   0x00, 5, "740", SIS_TYPE_SOUTH},
         {PCI_PRODUCT_SIS_741,   0x00, 5, "741", SIS_TYPE_SOUTH},
         {PCI_PRODUCT_SIS_745,   0x00, 5, "745", SIS_TYPE_100NEW},
 -       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_SOUTH},
 +       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_133NEW},
         {PCI_PRODUCT_SIS_748,   0x00, 6, "748", SIS_TYPE_SOUTH},
         {PCI_PRODUCT_SIS_750,   0x00, 6, "750", SIS_TYPE_SOUTH},
         {PCI_PRODUCT_SIS_751,   0x00, 6, "751", SIS_TYPE_SOUTH},

 I booted this kernel from the hard drive and, after mounting the
 install CD, I tried a command like the following:

 find /mnt -type f| xargs wc

 What I saw was a bunch of timeouts and some read failures.  Here is
 the "dmesg" output from this experiment:

 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 8192 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=8192, c_skip=0
 cd0: transfer error, downgrading to Ultra-DMA mode 3
 cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 3 (using DMA)
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 2048 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=2048, c_skip=0
 cd0: transfer error, downgrading to Ultra-DMA mode 2
 cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 2048 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=2048, c_skip=0
 cd0: transfer error, downgrading to Ultra-DMA mode 1
 cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA)
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 32 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=32, c_skip=0
 cd0: transfer error, downgrading to PIO mode 4
 cd0(siside0:1:0): using PIO mode 4
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
 cd0(siside0:1:0): generic HBA error
 siside0:1:0: piomode timed out

 These errors are very similar to what I saw in the initial problem
 report.  With my previous attempt at setting SIS_TYPE_100NEW, I didn't
 see these timeout errors or aborted reads with essentially the same
 "find" command as above.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48858
Date: Sun, 1 Jun 2014 11:01:19 -0600

 I should have also repeated my "find" command test with the unpatched
 6.1.4 kernel.  I just did that and the result is consistent with my
 initial installation attempt, which is that I am unable to mount the
 CD-ROM and I get timeouts.  Here is the "dmesg" output:

 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 32 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=32, c_skip=0
 cd0: transfer error, downgrading to Ultra-DMA mode 3
 cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 3 (using DMA)
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
 cd0(siside0:1:0): generic HBA error
 siside0:1:0: lost interrupt
         type: atapi tc_bcount: 8 tc_skip: 0
 siside0:1:0: bus-master DMA error: missing interrupt, status=0x61
 siside0:1:0: device timeout, c_bcount=8, c_skip=0
 cd0: transfer error, downgrading to Ultra-DMA mode 2
 cd0(siside0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
 wd2(siside0:1:1): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48858
Date: Wed, 4 Jun 2014 20:05:11 -0600

 I found out what was missing.  It turns out that the patch to siside.c
 (v. 1.35 -> 1.36) was valid, but it was also necessary to sync the
 timing settings from FreeBSD 10 (sys/dev/ata/chipsets/ata-sis.c, lines
 266-267).  Here is the patch:

 --- pciide_sis_reg.h.orig       2009-10-19 18:41:16.000000000 +0000
 +++ pciide_sis_reg.h    2014-06-02 18:00:46.000000000 +0000
 @@ -108,4 +108,5 @@
  static const u_int32_t sis_dma133new_tim[] __unused =
      {0x22196008, 0x0c0a3008, 0x05093008};
  static const u_int32_t sis_udma133new_tim[] __unused =
 -    {0x9f4, 0x64a, 0x474, 0x254, 0x234, 0x224, 0x214};
 +  /* {0x9f4, 0x64a, 0x474, 0x254, 0x234, 0x224, 0x214}; */
 +    {0x9fc, 0x6ac, 0x47c, 0x25c, 0x23c, 0x22c, 0x21c};

 With this, I was able to mount the CD-ROM and see that it was very
 busy while reading files for the following test:

 find /cdrom -type f|xargs wc

 I also built and burned an install CD-ROM with the patched kernel.
 The CD-ROM booted and the installation was successful.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Paul Fox <pgf@foxharp.boston.ma.us>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48858
Date: Tue, 08 Jul 2014 11:37:12 -0400

 i have a machine exhibiting this issue, running with the
 netbsd-current 0625141200Z kernel, from the installer:
     siside0:0:0: lost interrupt
             type: atapi tc_bcount:32 tc_skip: 0
     siside0:0:0: bus-master DMA error: missing interrupt, status=3D0x21


 linux 2.6.31 and 3.5.0 both report:
     Detected SiS 1183/966/966L/968/680 controller in PATA mode

 an old knoppix 3.9 disk (kernel 2.6.11) seems to detect SIS5513.

 i'm happy to try the suggested (or any) fix, but since i'm not really
 a netbsd guy, and was only trying to install to investigate a
 different reported problem, my time to invest in kernel building and
 image construction is limited.  i'm not set up for PXE booting, but if
 someone has an iso or USB image handy i can try that, or maybe i'll
 just have to wait for a fix to land in a nightly kernel before i can
 help test.

 paul
 =3D----------------------
  paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 74.5 degree=
 s)

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/48858
Date: Tue, 8 Jul 2014 18:21:05 -0600

 On Tue, Jul 08, 2014 at 05:00:01PM +0000, Paul Fox wrote:
 > The following reply was made to PR kern/48858; it has been noted by GNATS.
 > 
 > From: Paul Fox <pgf@foxharp.boston.ma.us>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: kern/48858
 > Date: Tue, 08 Jul 2014 11:37:12 -0400
 > 
 >  i have a machine exhibiting this issue, running with the
 >  netbsd-current 0625141200Z kernel, from the installer:
 >      siside0:0:0: lost interrupt
 >              type: atapi tc_bcount:32 tc_skip: 0
 >      siside0:0:0: bus-master DMA error: missing interrupt, status=3D0x21
 >  
 >  
 >  linux 2.6.31 and 3.5.0 both report:
 >      Detected SiS 1183/966/966L/968/680 controller in PATA mode
 >  
 >  an old knoppix 3.9 disk (kernel 2.6.11) seems to detect SIS5513.
 >  
 >  i'm happy to try the suggested (or any) fix, but since i'm not really
 >  a netbsd guy, and was only trying to install to investigate a
 >  different reported problem, my time to invest in kernel building and
 >  image construction is limited.  i'm not set up for PXE booting, but if
 >  someone has an iso or USB image handy i can try that, or maybe i'll
 >  just have to wait for a fix to land in a nightly kernel before i can
 >  help test.
 >  
 >  paul
 >  =3D----------------------
 >   paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 74.5 degree=
 >  s)

 In the absence of anything else, I put the latest build I've used on
 the affected system here:

 http://www.nyx.net/~rcbixler/NetBSD-6.1.4_PATCH-i386.iso

 I'm not sure how much bandwidth is available here, so this could be a
 rather slow download.  Also, I can't keep this file here indefinitely,
 so please let me know when you have the file and how your fare with
 booting from it.  I'll probably be obliged to delete the image soon.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Paul Fox <pgf@foxharp.boston.ma.us>
To: gnats-bugs@NetBSD.org
Cc: Roy Bixler <rcbixler@nyx.net>
Subject: Re: kern/48858
Date: Thu, 10 Jul 2014 09:11:25 -0400

 thanks for the .iso image.

 sadly, i get the same errors with your patched kernel as before.  it
 was certainly worth a shot!

 paul
 =3D----------------------
  paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 67.3 degree=
 s)

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/48858
Date: Thu, 10 Jul 2014 08:34:00 -0600

 Thanks for trying.  I'm not sure yet what your chipset is, so it's
 possible my patches didn't cover that case.  Can you give the dmesg
 output like I did earlier in this bug report?  Also, it might be
 interesting to try the FreeBSD 10 Live-CD, see if that works and give
 the "dmesg" output from that.

 On Thu, Jul 10, 2014 at 01:15:00PM +0000, Paul Fox wrote:
 > The following reply was made to PR kern/48858; it has been noted by GNATS.
 > 
 > From: Paul Fox <pgf@foxharp.boston.ma.us>
 > To: gnats-bugs@NetBSD.org
 > Cc: Roy Bixler <rcbixler@nyx.net>
 > Subject: Re: kern/48858
 > Date: Thu, 10 Jul 2014 09:11:25 -0400
 > 
 >  thanks for the .iso image.
 >  
 >  sadly, i get the same errors with your patched kernel as before.  it
 >  was certainly worth a shot!
 >  
 >  paul
 >  =3D----------------------
 >   paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 67.3 degree=
 >  s)
 >  

 -- 
 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: Re: kern/48858
Date: Sun, 11 Oct 2015 08:49:34 -0600

 A small update: I was able to successfully install NetBSD 7.0 on this
 hardware.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.