From pmc@phase23.dinoex.sub.de  Wed Mar 26 19:45:55 2008
Return-Path: <pmc@phase23.dinoex.sub.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3E7751065673
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Mar 2008 19:45:55 +0000 (UTC)
	(envelope-from pmc@phase23.dinoex.sub.de)
Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F3388FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Mar 2008 19:45:54 +0000 (UTC)
	(envelope-from pmc@phase23.dinoex.sub.de)
Received: from uucp.dinoex.sub.de (uucp@uucp.dinoex.sub.de [194.45.71.2] (may be forged))
	by uucp.dinoex.sub.de (8.14.1/8.14.0) with ESMTP id m2QJF8DB017597
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Mar 2008 20:15:08 +0100 (CET)
	(envelope-from pmc@phase23.dinoex.sub.de)
Received: from phase23.dinoex.sub.de (uucp@localhost)
	by uucp.dinoex.sub.de (8.14.1/8.14.0/Submit) with UUCP id m2QJF8We017595
	for FreeBSD-gnats-submit@freebsd.org; Wed, 26 Mar 2008 20:15:08 +0100 (CET)
	(envelope-from pmc@phase23.dinoex.sub.de)
Received: from gate.oper.dinoex.org (gate-e [192.168.98.2])
	by citylink.dinoex.sub.de (8.14.2/8.13.6) with ESMTP id m2O4Kx1r009456
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Mar 2008 05:20:59 +0100 (CET)
	(envelope-from pmc@disp.oper.dinoex.org)
Received: from disp.oper.dinoex.org (disp-fe.oper.dinoex.org [192.168.96.5])
	by gate.oper.dinoex.org (8.14.2/8.14.2) with ESMTP id m2O4JdTB008378
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Mar 2008 05:19:39 +0100 (CET)
	(envelope-from pmc@disp.oper.dinoex.org)
Received: from disp.oper.dinoex.org (localhost [127.0.0.1])
	by disp.oper.dinoex.org (8.14.2/8.14.2) with ESMTP id m2O4HcYI009235
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Mar 2008 05:17:38 +0100 (CET)
	(envelope-from pmc@disp.oper.dinoex.org)
Received: (from pmc@localhost)
	by disp.oper.dinoex.org (8.14.2/8.14.2/Submit) id m2O4HcZ3009234;
	Mon, 24 Mar 2008 05:17:38 +0100 (CET)
	(envelope-from pmc)
Message-Id: <200803240417.m2O4HcZ3009234@disp.oper.dinoex.org>
Date: Mon, 24 Mar 2008 05:17:38 +0100 (CET)
From: Peter Much <pmc@citylink.dinoex.sub.org>
Reply-To: Peter Much <pmc@citylink.dinoex.sub.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: panic when using WD-8013 with ed(4)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         122126
>Category:       kern
>Synopsis:       [ed] [panic] panic when using WD-8013 with ed(4)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 26 19:50:01 UTC 2008
>Closed-Date:    Thu May 07 18:13:00 UTC 2009
>Last-Modified:  Thu May 07 18:13:00 UTC 2009
>Originator:     Peter Much
>Release:        FreeBSD 6.3-RELEASE-p1 i386
>Organization:
n/a
>Environment:
System: FreeBSD disp.oper.dinoex.org 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #4: Tue Feb 26 15:01:43 CET 2008 root@disp.oper.dinoex.org:/usr/src/sys/i386/compile/D1R63V1 i386

FreeBSD 6.3-RELEASE-p1
GENERIC (UP) kernel

ed0 at port 0x300-0x31f iomem 0xcc000-0xcffff irq 11 on isa0
ed0: Ethernet address: 00:00:c0:30:b7:2f
ed0: type WD8013EPC (16 bit)

>Description:

After upgrade from Release 5.5 to 6.3 the network does no longer work.
Adapter is detected and can be brought up for inet.
At the first data transfer kernel panics from process "irq11: ed0"
in ithread_loop().

>How-To-Repeat:

ifconfig ed0 192.168.94.3
ping 192.168.94.4

>Fix:

A replacement card (NE2000 based) works ok, but as that one does not 
have iomem at all, it seems to work a bit different.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Sat Mar 29 15:50:43 UTC 2008 
State-Changed-Why:  

Peter, 
please show us the panic and a backtrace. Also please include the kernel 
config modifications you're using (a diff would be fine). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122126 

From: Peter Much <pmc@citylink.dinoex.sub.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/122126: [ed] [panic] panic when using WD-8013 with ed(4)
Date: Sun, 30 Mar 2008 16:41:41 +0200

 ! please show us the panic and a backtrace. Also please include the
 kernel
 ! config modifications you're using (a diff would be fine).
 
 Here is the panic and backtrace:
 
 >Fatal trap 12: page fault while in kernel mode
 >fault virtual address   = 0x30c00008
 >fault code              = supervisor read, page not present
 >instruction pointer     = 0x20:0xc052f98c
 >stack pointer           = 0x28:0xcbfe1cf8
 >frame pointer           = 0x28:0xcbfe1d0c
 >code segment            = base 0x0, limit 0xfffff, type 0x1b
 >                        = DPL 0, pres 1, def32 1, gran 1
 >processor eflags        = interrupt enabled, resume, IOPL = 0
 >current process         = 30 (irq11: ed0)
 >trap number             = 12
 >panic: page fault
 >Uptime: 4m31s
 >Cannot dump. No dump device defined.
 >Automatic reboot in 3600 seconds - press a key on the console to
 abort
 >KDB: enter: manual escape to debugger
 >[thread pid 30 tid 100035]
 >Stopped at      kdb_enter+0x2c: leave
 >db> bt
 >Tracing pid 30 tid 100035 td 0xc2180480
 >kdb_enter(c0780f9a,28,28,1,c0828880,...) at kdb_enter+0x2c
 >scgetc(c0815780,1,c07fd760,4,c2146ac0,...) at scgetc+0x302
 >sccngetch(c07c57c0,8c84,cbfe1bdc,c0546e48,186a0,...) at
 sccngetch+0xae
 >cncheckc(186a0,c2167000,cbfe1c14,c05469ae,0,...) at cncheckc+0x37
 >shutdown_panic(0,104,c217628c,c216700c,c23e938c,...) at
 shutdown_panic+0x3c
 >boot(104,0,cbfe1cb8,c,cbfe1c5c,...) at boot+0x316
 >panic(c074f3cc,c07844e5,30c00008,0,fffff,...) at panic+0xb8
 >trap_fatal(c2180480,c07f63e0,30c00000,0,cbfe1cb8,...) at
 trap_fatal+0x225
 >trap_pfault(30c00008) at trap_pfault+0x197
 >trap(c2180008,28,78310028,4,c2176780,...) at trap+0x329
 >calltrap() at calltrap+0x5
 >--- trap 0xc, eip = 0xc052f98c, esp = 0xcbfe1cf8, ebp = 0xcbfe1d0c
 ---
 >ithread_loop(c22bf500,cbfe1d38,c22bf500,c052f874,...) at
 ithread_loop+0x118
 >fork_exit(c052f874,c22bf500,cbfe1d38) at fork_exit + 0x4f
 >fork_trampoline() at fork_trampoline + 0x8
 >--- trap 0x1, eip = 0, esp = 0xcbfe1d6c, ebp = 0 ---
 
 
 Now for a config diff, the problem is that my config is inherited
 (since RELEASE_2.1.0 - as the whole machine is just growing and
 never full replaced) - it isn't similar in sequence to today's 
 GENERIC. 
 And as I mentioned, I have tried to boot GENERIC and there the panic
 does happen equally. 
 I didn't send the PR from GENERIC, because I essentially consider 
 it harmful to boot GENERIC to anywhere beyond singleuser; and anyway
 it is impossible to get debugging information from GENERIC since
 in case of a panic it overfills the screen and then just freezes 
 and waits for a hard powercycle.
 
 This is what remains on the screen in that case:
 >frame pointer           = 0x28:0xcbfe2cec
 >code segment            = base 0x0, limit 0xfffff, type 0x1b
 >                        = DPL 0, pres 1, def32 1, gran 1
 >processor eflags        = interrupt enabled, resume, IOPL = 0
 >current process         = 30 (irq11: ed0)
 >trap number             = 12
 >panic: page fault
 >Uptime: 8m15s
 >kernel trap 12 with interrupts disabled
 >
 >
 >Fatal trap 12: page fault while in kernel mode
 >fault virtual address   = 0x7010
 >fault code              = supervisor read, page not present
 >instruction pointer     = 0x20:0xc06b15ed
 >stack pointer           = 0x28:0xcbfe27d0
 >frame pointer           = 0x28:0xcbfe27d8
 >code segment            = base 0x0, limit 0xfffff, type 0x1b
 >                        = DPL 0, pres 1, def32 1, gran 1
 >processor eflags        = resume, IOPL = 0
 >current process         = 30 (irq11: ed0)
 >trap number             = 12
 >panic: page fault
 >Uptime: 8m16s
 
 
 Anyway, here is some sorted diff between GENERIC and my custom
 kernel:
 
 --- GENERIC     2008-03-30 04:35:06.000000000 +0200
 +++ E1R63V1     2008-03-30 04:35:16.000000000 +0200
 -cpu            I486_CPU
 -cpu            I586_CPU
 -device         aac             # Adaptec FSA RAID
 -device aacp # SCSI passthrough for aac (requires CAM)
 -device         adv             # Advansys SCSI adapters
 -device         adw             # Advansys wide SCSI adapters
 +device         "i4b"                   # Layer 4
 +device         "i4bctl"                # Userland control
 +device         "i4bing"                # netgraph interface
 +device         "i4bipr"                # IP over raw HDLC
 +device         "i4bq921"               # Layer 2
 +device         "i4bq931"               # Layer 3
 +device         "i4brbch"               # raw ChB access
 +device         "i4btel"                # telephony
 +device         "i4btrc"                # Userland tracing
 +device         adv             # Advansys
 -device         aha             # Adaptec 154x SCSI adapters
 -device         ahb             # EISA AHA1742 family
 -device ahc # AHA2940 and onboard AIC7xxx devices
 -device ahd # AHA39320/29320 and onboard AIC79xx devices
 -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
 -device         amd             # AMD 53C974 (Tekram DC-390(T))
 -device         amr             # AMI MegaRAID
 -device an # Aironet 4500/4800 802.11 wireless NICs.
 -device         apic                    # I/O APIC
 -device         arcmsr          # Areca SATA II RAID
 -device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID
 +device         apic            # I/O APIC
 -device         atapifd         # ATAPI floppy drives
 -device         atapist         # ATAPI tape drives
 -device         ataraid         # ATA RAID drives
 -device         ath             # Atheros pci/cardbus NIC's
 -device ath_hal # Atheros HAL (Hardware Access Layer)
 -device         ath_rate_sample # SampleRate tx rate control for ath
 -device         aue             # ADMtek USB Ethernet
 -device         awi             # BayStack 660 and others
 -device         axe             # ASIX Electronics USB Ethernet
 -device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet
 -device         bfe             # Broadcom BCM440x 10/100 Ethernet
 -device         bge             # Broadcom BCM570xx Gigabit Ethernet
 -device bt # Buslogic/Mylex MultiMaster SCSI adapters
 -device         cardbus         # CardBus (32-bit) bus
 -device         cbb             # cardbus (yenta) bridge
 -device         cdce            # Generic USB over Ethernet
 -device         ciss            # Compaq Smart RAID 5*
 -device         cs              # Crystal Semiconductor CS89x0 NIC
 -device         cue             # CATC USB Ethernet
 -device dc # DEC/Intel 21143 and various workalikes
 -device dpt # DPT Smartcache III, IV - See NOTES for options
 -device         eisa
 -device em # Intel PRO/1000 adapter Gigabit Ethernet Card
 -device         ep              # Etherlink III based cards
 -device ex # Intel EtherExpress Pro/10 and Pro/10+
 -device         fe              # Fujitsu MB8696x based cards
 -device         firewire        # FireWire bus code
 -device fwe # Ethernet over FireWire (non-standard!)
 -device fxp # Intel EtherExpress PRO/100B (82557, 82558)
 +device         fxp             # Compaq dual NC3134
 -device         hptmv           # Highpoint RocketRAID 182x
 -device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
 -device         ida             # Compaq Smart RAID
 -device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc.
 -device         iir             # Intel Integrated RAID
 -device         ips             # IBM (Adaptec) ServeRAID
 +device         io              # I/O device
 +device         isa
 +device         isic                    # Chipset
 -device         ixgb            # Intel PRO/10GbE Ethernet Card
 -device         kbdmux          # keyboard multiplexer
 -device         kue             # Kawasaki LSI USB Ethernet
 -device         lge             # Level 1 LXT1001 gigabit Ethernet
 -device lnc # NE2100, NE32-VL Lance Ethernet cards
 -device         mfi             # LSI MegaRAID SAS
 +device         mem             # Memory and kernel memory devices
 -device         mlx             # Mylex DAC960 family
 -device         mly             # Mylex AcceleRAID/eXtremeRAID
 -device         mpt             # LSI-Logic MPT-Fusion
 -device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet
 -device         ncv             # NCR 53C500
 -device         nge             # NatSemi DP83820 gigabit Ethernet
 -device         nsp             # Workbit Ninja SCSI-3
 -device nve # nVidia nForce MCP on-board Ethernet Networking
 +device         nmdm            # null modem pair
 +device         npx
 -device         pccard          # PC Card (16-bit) bus
 -device pcn # AMD Am79C97x PCI 10/100(precedence over 'lnc')
 -device         psm             # PS/2 mouse
 -device         pst             # Promise Supertrak SX6000
 -device ral # Ralink Technology RT2500 wireless NICs.
 -device         re              # RealTek 8139C+/8169/8169S/8110S
 -device         rr232x          # Highpoint RocketRAID 232x
 -device         rue             # RealTek RTL8150 USB Ethernet
 -device sbp # SCSI over FireWire (Requires scbus and da)
 -device         sf              # Adaptec AIC-6915 (``Starfire'')
 -device sis # Silicon Integrated Systems SiS 900/SiS 7016
 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet
 -device sn # SMC's 9000 series of Ethernet chips
 -device splash # Splash screen and screen saver support
 -device         ste             # Sundance ST201 (D-Link DFE-550TX)
 -device         stg             # TMC 18C30/18C50
 -device stge # Sundance/Tamarack TC9021 gigabit Ethernet
 -device ti # Alteon Networks Tigon I/II gigabit Ethernet
 -device         tl              # Texas Instruments ThunderLAN
 -device         trm             # Tekram DC395U/UW/F DC315U adapters
 -device         twa             # 3ware 9000 series PATA/SATA RAID
 -device         twe             # 3ware ATA RAID
 -device tx # SMC EtherPower II (83c170 ``EPIC'')
 -device         txp             # 3Com 3cR990 (``Typhoon'')
 +device         ucom            # prereq fuer uplcom
 -device ural # Ralink Technology RT2500USB wireless NICs
 +device uplcom # Digitus/Prolific USB-to-serial-adapt.
 -device         vge             # VIA VT612x gigabit Ethernet
 -device         vr              # VIA Rhine, Rhine II
 -device         vx              # 3Com 3c590, 3c595 (``Vortex'')
 -device         wb              # Winbond W89C840F
 -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
 -device         wlan            # 802.11 support
 -device         wlan_ccmp       # 802.11 CCMP support
 -device         wlan_tkip       # 802.11 TKIP support
 -device         wlan_wep        # 802.11 WEP support
 -device         xe              # Xircom pccard Ethernet
 -ident          GENERIC
 +ident          E1R63V1
 -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
 +options                ACCEPT_FILTER_DATA
 +options                ACCEPT_FILTER_HTTP
 -options ADAPTIVE_GIANT # Giant mutex is adaptive.
 -options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
 -options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
 -options                ATA_STATIC_ID   # Static device numbering
 +options                AUTO_EOI_1
 +options                COMPAT_AOUT
 +options                COMPAT_LINUX
 +options                DDB
 +options                DUMMYNET
 +options                INCLUDE_CONFIG_FILE
 +options                IPDIVERT
 +options                IPFIREWALL
 +options                IPFIREWALL_FORWARD
 +options                IPR_LOG=32
 +options                IPR_VJ
 +options                IPSEC
 +options                IPSEC_ESP
 +options                KDB
 +options                KDB_UNATTENDED
 +options                LINPROCFS
 +options                LINSYSFS
 -options MD_ROOT # MD is a potential root device
 +options MSGBUF_SIZE=61440 # viele gvinum und ipfw Zeilen!
 +options                NETGRAPH
 +options                NETGRAPH_ETHER
 +options                NETGRAPH_PPPOE
 +options                NETGRAPH_SOCKET
 +options                NI4BING=2
 +options                NI4BIPR=2
 +options                NI4BRBCH=2
 +options                NI4BTEL=2
 +options                NI4BTRC=2
 -options NFS_ROOT # NFS usable as /, requires NFSCLIENT
 +options                NULLFS                  # NULL filesystem
 +options                PANIC_REBOOT_WAIT_TIME=3600
 -options PREEMPTION # Enable kernel thread preemption
 +options                PREEMPTION
 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
 +options SCSI_DELAY=2000 # Delay (in ms) before probing SCSI
 +options                SW_WATCHDOG
 +options                TEL_S0_16_3
 
 
 Further, here are the modifications in /boot:
 /boot/loader.conf:
 >loader_logo="beastie"
 >geom_vinum_load="YES"
 
 /boot/devices_hints:
 >hint.ed.0.at="isa"
 >hint.ed.0.disabled="0"
 >hint.ed.0.port="0x300"
 >hint.ed.0.irq="11"
 >hint.ed.0.maddr="0xcc000"
 >hint.isic.0.at="isa"
 >hint.isic.0.port="0xd80"
 >hint.isic.0.irq="12"
 >hint.isic.0.flags="3"
 
 
 I should also mention that I already have done these steps: 
  - reboot the old OS version and check if it still works there,
    to rule out a sudden hw failure.
  - try "minimal config": remove all add-on hardware except the
    failing part. 
 The board itself is an ASUS P2B, and the bootlog can be sent to
 interested investigators, but will not be published, for security
 reasons.
 
State-Changed-From-To: feedback->open 
State-Changed-By: vwe 
State-Changed-When: Sun Mar 30 20:56:46 UTC 2008 
State-Changed-Why:  

feedback received 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122126 

From: Peter Much <pmc@citylink.dinoex.sub.org>
To: bug-followup@FreeBSD.org
Cc: Volker Werth <vwe@FreeBSD.org>
Subject: Re: kern/122126: [ed] [panic] panic when using WD-8013 with ed(4)
Date: Tue, 1 Apr 2008 01:00:23 +0200

 I tried to find out some more:
 
 1. The panic happens only when pinging to an existing station on the
    BNC network.
    Pinging to a non-existent address will give the correct "host is
    down" message.
 
 2. I tried to add 
    > makeoptions DEBUG=-g
    to my kernel config and rebuilt. 
    But when running this kernel, it gives the same behaviour as
    the GENERIC kernel: it shows multiple panics scrolling off the
    screen and then freezes. It does not try to dump.
 
 3. I did boot without acpi. No difference.

From: Volker Werth <vwe@freebsd.org>
To: Peter Much <pmc@citylink.dinoex.sub.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/122126: [ed] [panic] panic when using WD-8013 with ed(4)
Date: Tue, 01 Apr 2008 23:38:46 +0200

 Dear Peter,
 
 thanks for all the requested infos.
 
 As running currently running a bit low on time, I'm unable to fully
 diagnose this issue really deep but I do have some first shots:
 
 I'm pretty sure, it's an interrupt handling problem
 
 My best hint for you for now is to update your BIOS. Please check your
 vendor site for an updated BIOS. If you really can't find one, we need
 to manually create an AML bugfix for your system as your AML code seems
 to be broken:
 > acpi_bus_number: root bus has no _BBN, assuming 0
 
 As you wrote, you're able to panic your box even w/o ACPI enabled, this
 may not relate to your problem but my experience shows, when running
 with a good ACPI implementation, the box will not show much strange
 behaviour.
 
 These lines:
 pcib0: slot 4 INTD routed to irq 9 via \\_SB_.LNKD
 pcib0: slot 9 INTA routed to irq 9 via \\_SB_.LNKD
 pcib0: slot 10 INTA routed to irq 9 via \\_SB_.LNKC
 pcib0: slot 10 INTB routed to irq 9 via \\_SB_.LNKD
 seem to indicate, the PCI slots aren't routed to IRQs nicely. Please try
 if you can fix this in the BIOS settings.
 
 Now, a bit for the real issue:
 
 Your box is receiving a packet from the network (ed0). ed0 fires an IRQ
 which is handled by the kernel. While the kernel tries to dispatch the
 IRQ to the right handler (the ed0 driver in this case), the box panics -
 for whatever reason but the "fault virtual address" is looking
 suspicious. With everything I've now checked on your issue, I'm always
 coming to the point, there's something wrong with the ithread dispatcher.
 
 Volker
 

From: Peter Much <pmc@citylink.dinoex.sub.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/122126: [ed] [panic] panic when using WD-8013 with ed(4)
Date: Thu, 7 May 2009 05:10:13 +0200

 The Problem has disappeared after upgrading to
 
 >FreeBSD edge.oper.dinoex.org 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #3: Thu Apr 23 23:44:42 CEST 2009 
 >root@:/usr/src/sys/i386/compile/E1R72V1  i386
 
 Now the NE2000 has become completely unuseable (thruput varying
 wildly between 1 and 100 kB/sec without any obvious reason - but that
 card is crap anyway) and the old Irish beauty runs just as solid
 as earlier.
 
 This issue can be closed.
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Thu May 7 18:12:47 UTC 2009 
State-Changed-Why:  
Fixed with newest checkins. 

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