From pb@ludd.luth.se  Thu Nov 21 08:16:40 2002
Return-Path: <pb@ludd.luth.se>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F2BED37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Nov 2002 08:16:39 -0800 (PST)
Received: from mother.ludd.luth.se (mother.ludd.luth.se [130.240.16.3])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7E4CC43E3B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Nov 2002 08:16:34 -0800 (PST)
	(envelope-from pb@ludd.luth.se)
Received: from brother.ludd.luth.se (brother.ludd.luth.se [130.240.16.78])
	by mother.ludd.luth.se (8.11.6+Sun/8.9.3) with ESMTP id gALGGNX09550
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Nov 2002 17:16:23 +0100 (MET)
Received: (from pb@localhost)
	by brother.ludd.luth.se (8.11.6+Sun/8.9.3) id gALGGNv07185
	for FreeBSD-gnats-submit@freebsd.org; Thu, 21 Nov 2002 17:16:23 +0100 (MET)
Message-Id: <200211211616.gALGGNv07185@brother.ludd.luth.se>
Date: Thu, 21 Nov 2002 17:16:23 +0100 (MET)
From: Peter B <pb@ludd.luth.se>
To: FreeBSD-gnats-submit@freebsd.org
Subject: ahc(A19160) pci parity error

>Number:         45568
>Category:       kern
>Synopsis:       [ahc] ahc(A19160) pci parity error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gibbs
>State:          suspended
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 21 08:20:01 PST 2002
>Closed-Date:    
>Last-Modified:  Mon Jan 02 21:26:47 GMT 2006
>Originator:     PB
>Release:        FreeBSD 4.6.1-RC2 #0 i386
>Organization:
>Environment:
 
 Machine:
   AMD XP1800 + 256MB UNB PC2100 CL2
   Asus A7V333 + 2x Intel SB82558B + Adaptec19160 + Brooktree 878 + ATI R7500 QW
                 fxp0, fxp1          ahc0           bktr0
 
 OS:
   FreeBSD 4.6.1-RC2 #0
   FreeBSD 4.7-R #0          (On reinstall)
  
 dmesg:
 FreeBSD 4.6.1-RC2 #0: Mon Sep  2 23:23:54 CEST 2002
     pb@wave.campus.luth.se:/usr/src/sys/compile/XP1800
 Timecounter "i8254"  frequency 1193182 Hz
 CPU: AMD Athlon(TM) XP 1800+ (1532.91-MHz 686-class CPU)
   Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
   Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
   AMD Features=0xc0480000<<b19>,AMIE,DSP,3DNow!>
 real memory  = 268419072 (262128K bytes)
 config> di pcic0
 No such device: pcic0
 Invalid command or syntax.  Type `?' for help.
 config> di sn0
 No such device: sn0
 Invalid command or syntax.  Type `?' for help.
 config> di lnc0
 No such device: lnc0
 Invalid command or syntax.  Type `?' for help.
 config> di ie0
 No such device: ie0
 Invalid command or syntax.  Type `?' for help.
 config> di fe0
 No such device: fe0
 Invalid command or syntax.  Type `?' for help.
 config> di ed0
 config> di cs0
 No such device: cs0
 Invalid command or syntax.  Type `?' for help.
 config> di bt0
 No such device: bt0
 Invalid command or syntax.  Type `?' for help.
 config> di ata1
 config> di ata0
 config> di aic0
 No such device: aic0
 Invalid command or syntax.  Type `?' for help.
 config> di aha0
 No such device: aha0
 Invalid command or syntax.  Type `?' for help.
 config> di adv0
 No such device: adv0
 Invalid command or syntax.  Type `?' for help.
 config> q
 avail memory = 257339392 (251308K bytes)
 Preloaded elf kernel "kernel" at 0xc03c9000.
 Preloaded userconfig_script "/boot/kernel.conf" at 0xc03c909c.
 Pentium Pro MTRR support enabled
 md0: Malloc disk
 Using $PIR table, 11 entries at 0xc00f2050
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 pcib0: <Host to PCI bridge> on motherboard
 pci0: <PCI bus> on pcib0
 pcib1: <PCI to PCI bridge (vendor=1106 device=b099)> at device 1.0 on pci0
 pci1: <PCI bus> on pcib1
 pci1: <ATI model 5157 graphics accelerator> at 0.0 irq 11
 pci0: <unknown card> (vendor=0x13f6, dev=0x0111) at 5.0 irq 10
 pci0: <unknown card> (vendor=0x104c, dev=0x8026) at 7.0 irq 10
 uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 9 at device 9.0 on pci0
 usb0: <VIA 83C572 USB controller> on uhci0
 usb0: USB revision 1.0
 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhci1: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 11 at device 9.1 on pci0
 usb1: <VIA 83C572 USB controller> on uhci1
 usb1: USB revision 1.0
 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 pci0: <USB controller> at 9.2 irq 10
 bktr0: <BrookTree 878> mem 0xcf000000-0xcf000fff irq 9 at device 12.0 on pci0
 iicbb0: <I2C bit-banging driver> on bti2c0
 iicbus0: <Philips I2C bus> on iicbb0 master-only
 iicsmb0: <I2C to SMB bridge> on iicbus0
 smbus0: <System Management Bus> on iicsmb0
 smb0: <SMBus general purpose I/O> on smbus0
 iic0: <I2C general purpose I/O> on iicbus0
 iicbus1: <Philips I2C bus> on iicbb0 master-only
 iicsmb1: <I2C to SMB bridge> on iicbus1
 smbus1: <System Management Bus> on iicsmb1
 smb1: <SMBus general purpose I/O> on smbus1
 iic1: <I2C general purpose I/O> on iicbus1
 smbus2: <System Management Bus> on bti2c0
 smb2: <SMBus general purpose I/O> on smbus2
 bktr0: Warning - card vendor 0xffff (model 0xffff) unknown.
 bktr0: Pinnacle/Miro TV, Temic NTSC tuner, remote control.
 pci0: <unknown card> (vendor=0x109e, dev=0x0878) at 12.1 irq 9
 ahc0: <Adaptec 19160B Ultra160 SCSI adapter> port 0xa800-0xa8ff mem 0xc9800000-0
 xc9800fff irq 11 at device 13.0 on pci0
 aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
 fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xa400-0xa41f mem 0xc9000000-0xc90f
 ffff,0xcd800000-0xcd800fff irq 10 at device 14.0 on pci0
 fxp0: Ethernet address 00:a0:c9:e7:3b:58
 inphy0: <i82555 10/100 media interface> on miibus0
 inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 fxp1: <Intel Pro 10/100B/100+ Ethernet> port 0xa000-0xa01f mem 0xc8800000-0xc88f
 ffff,0xcc800000-0xcc800fff irq 9 at device 15.0 on pci0
 fxp1: Ethernet address 00:a0:c9:e7:37:0b
 inphy1: <i82555 10/100 media interface> on miibus1
 inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 isab0: <PCI to ISA bridge (vendor=1106 device=3147)> at device 17.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <VIA 8233 ATA133 controller> port 0x9800-0x980f irq 0 at device 17.1 on pci0
 ata0: at 0x1f0 irq 14 on atapci0
 ata1: at 0x170 irq 15 on atapci0
 uhci2: <VIA 83C572 USB controller> port 0x9400-0x941f irq 9 at device 17.2 on pci0
 usb2: <VIA 83C572 USB controller> on uhci2
 usb2: USB revision 1.0
 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 ugen0: OmniVision OV511 Camera, rev 1.00/1.00, addr 2
 uhci3: <VIA 83C572 USB controller> port 0x9000-0x901f irq 9 at device 17.3 on pci0
 usb3: <VIA 83C572 USB controller> on uhci3
 usb3: USB revision 1.0
 uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub3: 2 ports with 2 removable, self powered
 orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
 fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
 fdc0: FIFO enabled, 8 bytes threshold
 fd0: <1440-KB 3.5" drive> on fdc0 drive 0
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
 kbd0 at atkbd0
 psm0: <PS/2 Mouse> irq 12 on atkbdc0
 psm0: model Generic PS/2 mouse, device ID 0
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 pcf0: <PCF8584 I2C bus controller> at port 0x320-0x321 irq 5 on isa0
 iicbus2: <Philips I2C bus> on pcf0 addr 0xaa
 iicsmb2: <I2C to SMB bridge> on iicbus2
 smbus3: <System Management Bus> on iicsmb2
 smb3: <SMBus general purpose I/O> on smbus3
 iic2: <I2C general purpose I/O> on iicbus2
 sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
 sio0: type 16550A
 sio1 at port 0x2f8-0x2ff irq 3 on isa0
 sio1: type 16550A
 ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
 ppi0: <Parallel I/O> on ppbus0
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 IP packet filtering initialized, divert disabled, rule-based forwarding disabled, default to deny, logging limited to 100 packets/entry by default
 ad0: 76319MB <ST380021A> [155061/16/63] at ata0-master UDMA100
 Waiting 2 seconds for SCSI devices to settle
 Mounting root from ufs:/dev/da0s1a
 da0 at ahc0 bus 0 target 0 lun 0
 da0: <SEAGATE ST318438LW 0003> Fixed Direct Access SCSI-3 device 
 da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
 da0: 19001MB (38914049 512 byte sectors: 64H 32S/T 19001C)
 pcm0: <CMedia CMI8738> port 0xb800-0xb8ff irq 10 at device 5.0 on pci0
 cd0 at ahc0 bus 0 target 4 lun 0
 cd0: <NEC CD-ROM DRIVE:463 1.05> Removable CD-ROM SCSI-2 device 
 cd0: 10.000MB/s transfers (10.000MHz, offset 15)
 cd0: cd present [323126 x 2048 byte records]
 
 kernel config:
 machine         i386
 cpu             I686_CPU
 ident           GENERIC
 maxusers        0
 options         CPU_ATHLON_SSE_HACK     # Mplayer benefits
 options         CPU_ENABLE_SSE          # Mplayer benefits
 options         INET                    #InterNETworking
 options         FFS                     #Berkeley Fast Filesystem
 options         FFS_ROOT                #FFS usable as root device [keep this!]
 options         SOFTUPDATES             #Enable FFS soft updates support
 options         UFS_DIRHASH             #Improve performance on big directories
 options         MFS                     #Memory Filesystem
 options         NFS                     #Network Filesystem
 options         MSDOSFS                 #MSDOS Filesystem
 options         CD9660                  #ISO 9660 Filesystem
 options         PROCFS                  #Process filesystem
 options         COMPAT_43               #Compatible with BSD 4.3 [KEEP THIS!]
 options         USER_LDT                #allow user-level control of i386 ldt
 options         SCSI_DELAY=2000         #Delay (in ms) before probing SCSI
 options         UCONSOLE                #Allow users to grab the console
 options         USERCONFIG              #boot -c editor
 options         VISUAL_USERCONFIG       #visual boot -c editor
 options         KTRACE                  #ktrace(1) support
 options         SYSVSHM                 #SYSV-style shared memory
 options         SYSVMSG                 #SYSV-style message queues
 options         SYSVSEM                 #SYSV-style semaphores
 options         P1003_1B                #Posix P1003_1B real-time extensions
 options         _KPOSIX_PRIORITY_SCHEDULING
 options         ICMP_BANDLIM            #Rate limit bad replies
 options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
 device          isa
 device          pci
 device          fdc0    at isa? port IO_FD1 irq 6 drq 2
 device          fd0     at fdc0 drive 0
 device          fd1     at fdc0 drive 1
 device          ata0    at isa? port IO_WD1 irq 14
 device          ata1    at isa? port IO_WD2 irq 15
 device          ata
 device          atadisk                 # ATA disk drives
 device          atapicd                 # ATAPI CDROM drives
 options         ATA_STATIC_ID           #Static device numbering
 device          ahc             # AHA2940 and onboard AIC7xxx devices
 device          ncr             # NCR/Symbios Logic
 device          scbus           # SCSI bus (required)
 device          da              # Direct Access (disks)
 device          sa              # Sequential Access (tape etc)
 device          cd              # CD
 device          pass            # Passthrough device (direct SCSI access)
 device          atkbdc0 at isa? port IO_KBD
 device          atkbd0  at atkbdc? irq 1 flags 0x1
 device          psm0    at atkbdc? irq 12
 device          vga0    at isa?
 pseudo-device   splash
 device          sc0     at isa? flags 0x100
 device          npx0    at nexus? port IO_NPX irq 13
 device          apm0    at nexus? disable flags 0x20 # Advanced Power Management
 device          smbus           # Bus support, required for smb below.
 device          viapm
 device          smb
 device          iicbus          # Bus support, required for ic/iic/iicsmb below.
 device          iicbb
 device          ic
 device          iic
 device          iicsmb          # smb over i2c bridge
 device          pcf0    at isa? port 0x320 irq 5
 device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
 device          sio1    at isa? port IO_COM2 irq 3
 device          sio2    at isa? disable port IO_COM3 irq 5
 device          sio3    at isa? disable port IO_COM4 irq 9
 device          ppc0    at isa? irq 7
 device          ppbus           # Parallel port bus (required)
 device          lpt             # Printer
 device          plip            # TCP/IP over parallel
 device          ppi             # Parallel port interface device
 device          de              # DEC/Intel DC21x4x (``Tulip'')
 device          em              # Intel PRO/1000 adapter Gigabit Ethernet Card (``Wiseman'')
 device          txp             # 3Com 3cR990 (``Typhoon'')
 device          vx              # 3Com 3c590, 3c595 (``Vortex'')
 device          miibus          # MII bus support
 device          dc              # DEC/Intel 21143 and various workalikes
 device          fxp             # Intel EtherExpress PRO/100B (82557, 82558)
 device          pcn             # AMD Am79C97x PCI 10/100 NICs
 device          rl              # RealTek 8129/8139
 device          sf              # Adaptec AIC-6915 (``Starfire'')
 device          sis             # Silicon Integrated Systems SiS 900/SiS 7016
 device          ste             # Sundance ST201 (D-Link DFE-550TX)
 device          tl              # Texas Instruments ThunderLAN
 device          tx              # SMC EtherPower II (83c170 ``EPIC'')
 device          vr              # VIA Rhine, Rhine II
 device          wb              # Winbond W89C840F
 device          xl              # 3Com 3c90x (``Boomerang'', ``Cyclone'')
 device          bge             # Broadcom BCM570x (``Tigon III'')
 device          ed0     at isa? disable port 0x280 irq 10 iomem 0xd8000
 device          bktr
 pseudo-device   loop            # Network loopback
 pseudo-device   ether           # Ethernet support
 pseudo-device   sl      1       # Kernel SLIP
 pseudo-device   ppp     1       # Kernel PPP
 pseudo-device   tun             # Packet tunnel.
 pseudo-device   pty             # Pseudo-ttys (telnet etc)
 pseudo-device   md              # Memory "disks"
 options         IPFIREWALL              #firewall
 options         IPFIREWALL_VERBOSE      #enable logging to syslogd(8)
 options         IPFIREWALL_VERBOSE_LIMIT=100    #limit verbosity
 pseudo-device   bpf             #Berkeley packet filter
 device          uhci            # UHCI PCI->USB interface
 device          usb             # USB Bus (required)
 device          ugen            # Generic
 device          uhid            # "Human Interface Devices"
 device          ukbd            # Keyboard
 device          ulpt            # Printer
 device          umass           # Disks/Mass storage - Requires scbus and da
 device          ums             # Mouse
 device          uscanner        # Scanners
 device          urio            # Diamond Rio MP3 Player
 
>Description:
   When Adaptec A19160 and 2x Intel SB82558B is installed on the pci bus at the
   same time. Pci parity errors occours, and will *corrupt* your scsi disk(s).
   This happened on a 4.6.1-RC2 version. I tried 4.7-R aswell with the same 
   result. The only fix was to replace the 2x Intel SB82558B with 
   2x Realtek 8029.
   The setup without 2x Intel SB82558B has worked for 4 months. Another funny
   observation is that the Intel cards seems to do fine on my old pentium..
 
   First comes:
     ahc0: PCI error Interrupt at seqaddr = 0x9
     ahc0: Data Parity Error Detected during address ot write phase
     ahc0: PCI error Interrupt at seqaddr = 0x8
     ahc0: Data Parity Error Detected during address ot write phase
     .
     .
 
   And later:
     Nov 15 21:47:20 wave /kernel: dscheck(ad0): b_bcount 98307 is not on a
     sector boundary (ssize 512)
     Nov 15 21:47:40 wave /kernel: dscheck(#ad/2): b_bcount 98307 is not on a 
     sector boundary (ssize 512)
     Nov 15 21:47:42 wave /kernel: dscheck(#ad/2): b_bcount 98307 is not on a 
     sector boundary (ssize 512)
     Nov 15 21:48:29 wave /kernel: dscheck(#ad/2): b_bcount 104876 is not on a 
     sector boundary (ssize 512)
     .
     .
     This goes for the da0 disk aswell. I tried to install 4.7 on a ide disc
     with the 2xfxp + ahc. And got both installs corrupted due pci bus error.
     This will corrupt more than 'fsck' will handle.
 
   Maybe this is a bios setup fault but it shouldn't be. Anyway there ought to
   be fauilure mechanisms, ie freebsd should refuse to boot. And the setup 
   works _flawless_ with 2x RealTek 8029 replacing the 2x Intel SB82558B 
   (crap works better? :).
 
   Related PR's:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/12993
     http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/18185 (maybe?)
 
>How-To-Repeat:
 
 	A19160 + IntelPro100 on a A7V333 motherboard. Use A19160 in any manner.
         (Note, There was constant network traffic on my fxp0 in my setup)

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Sat Nov 23 03:38:50 PST 2002 
Responsible-Changed-Why:  
Misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45568 
Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: njl 
Responsible-Changed-When: Sat Dec 21 14:58:27 PST 2002 
Responsible-Changed-Why:  
Over to ahc maintainer.  I am suspicious because fxp1 is sharing an irq 
with ahc and this may be causing the pci errors. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45568 
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Tue Nov 29 06:00:39 GMT 2005 
State-Changed-Why:  
Mark this aging PR as suspended. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45568 
>Unformatted:
