From j@chiffon.c9x.org  Tue Apr 29 08:55:01 2008
Return-Path: <j@chiffon.c9x.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F3921065670
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Apr 2008 08:55:01 +0000 (UTC)
	(envelope-from j@chiffon.c9x.org)
Received: from chiffon.c9x.org (chiffon.c9x.org [91.121.114.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 038E68FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Apr 2008 08:55:00 +0000 (UTC)
	(envelope-from j@chiffon.c9x.org)
Received: by chiffon.c9x.org (Postfix, from userid 1000)
	id EAB13958045; Tue, 29 Apr 2008 10:54:58 +0200 (CEST)
Message-Id: <20080429085458.EAB13958045@chiffon.c9x.org>
Date: Tue, 29 Apr 2008 10:54:58 +0200 (CEST)
From: Frank DENIS <j@pureftpd.org>
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: if_re(4) regression on FreeBSD 7-STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         123202
>Category:       kern
>Synopsis:       [re] [regression] if_re(4) regression on FreeBSD 7-STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 29 09:00:12 UTC 2008
>Closed-Date:    Wed Mar 18 05:20:16 UTC 2009
>Last-Modified:  Wed Mar 18 05:20:16 UTC 2009
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 Since if_re changes were MFC'd on April 22, the NIC just stops working after
 a while. The system doesn't freeze, the kernel remains silent, but no more
 packets are passing though.
 
 It happens from one hour to 24 hours after the system has been rebooted, and
 it doesn't seem to be related to the actual traffic.
 
 Reverting if_re.c/if_rlreg.h to Revision 1.67.2.2 fixes this.
>How-To-Repeat:
Here's a dmesg.

Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-STABLE #6: Mon Apr 28 16:25:27 CEST 2008
    root@chiffon:/usr/obj/usr/src/sys/SMP
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz (2669.29-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6fb  Stepping = 11
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe3fd<SSE3,RSVD2,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20000000<LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 2136997888 (2038 MB)
avail memory = 2079780864 (1983 MB)
ACPI APIC Table: <INTEL DG31PR>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <INTEL> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
cpu0: <ACPI CPU> on acpi0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 82a082a0600082a
device_attach: est0 attach returned 6
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 82a082a0600082a
device_attach: est1 attach returned 6
p4tcc1: <CPU Frequency Thermal Control> on cpu1
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xd140-0xd147 mem 0xfeb00000-0xfeb7ffff,0xc0000000-0xdfffffff,0xfe900000-0xfe9fffff irq 16 at device 2.0 on pci0
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> irq 17 at device 28.1 on pci0
pci3: <ACPI PCI bus> on pcib3
re0: <RealTek 8168/8111B PCIe Gigabit Ethernet> port 0xc000-0xc0ff mem 0xfea20000-0xfea20fff irq 17 at device 0.0 on pci3
re0: Using 2 MSI messages
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: Ethernet address: 00:19:d1:b3:fc:69
re0: [FILTER]
re0: [FILTER]
uhci0: <UHCI (generic) USB controller> port 0xd080-0xd09f irq 23 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <UHCI (generic) USB controller> port 0xd060-0xd07f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <UHCI (generic) USB controller> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <UHCI (generic) USB controller> port 0xd040-0xd05f irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <UHCI (generic) USB controller> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
uhci3: <UHCI (generic) USB controller> port 0xd020-0xd03f irq 16 at device 29.3 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb3: <UHCI (generic) USB controller> on uhci3
usb3: USB revision 1.0
uhub3: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb3
uhub3: 2 ports with 2 removable, self powered
ehci0: <Intel 82801GB/R (ICH7) USB 2.0 controller> mem 0xfeb80000-0xfeb803ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <Intel 82801GB/R (ICH7) USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb4
uhub4: 8 ports with 8 removable, self powered
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci4: <ACPI PCI bus> on pcib4
twe0: <3ware Storage Controller. Driver version 1.50.01.002> port 0xb000-0xb00f mem 0xfe810000-0xfe81000f,0xfe000000-0xfe7fffff irq 21 at device 6.0 on pci4
twe0: [GIANT-LOCKED]
twe0: [ITHREAD]
twe0: 2 ports, Firmware FE8S 1.05.00.068, BIOS BE7X 1.08.00.048
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH7 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd0f0-0xd0ff irq 16 at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
atapci1: <Intel ICH7 SATA300 controller> port 0xd0e0-0xd0e7,0xd0d0-0xd0d3,0xd0c0-0xd0c7,0xd0b0-0xd0b3,0xd0a0-0xd0af irq 17 at device 31.2 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Sleep Button> on acpi0
acpi_button1: <Power Button> on acpi0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xcb800-0xcc7ff,0xcc800-0xcd7ff pnpid ORM0000 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
twed0: <Unit 0, TwinStor, Normal> on twe0
twed0: 238474MB (488395120 sectors)
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/twed0s1a
re0: link state changed to UP
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->yongari 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Apr 29 15:54:22 UTC 2008 
Responsible-Changed-Why:  
Rescue this from 'pending' and assign to committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123202 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Wed Apr 30 00:57:46 UTC 2008 
State-Changed-Why:  
Since I see "re0: Using 2 MSI messages" in dmesg output I think you 
are not using latest 7-stable. Make sure you have 
if_re.c rev 1.95.2.18 and if_rl.h rev 1.67.2.7. 

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

From: Frank Denis <j@pureftpd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/123202: [re] [regression] if_re(4) regression on FreeBSD
	7-STABLE
Date: Mon, 5 May 2008 18:01:51 +0200

 Hello,
 
 The bug report was indeed sent after the driver was reverted because the host still stops sending frames after a few hours, sometimes after a few minutes with 7-STABLE.
 
 Up to version 1.95.2.13 (included) of if_re.c and version 1.67.2.5 (included) of if_rlreg.h the NIC works properly.
 
 Upgrading to newer versions make it stop working again after a few hours.
 
 Best regards,
 
 -Frank.

From: Frank Denis <j@pureftpd.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/123202: [re] [regression] if_re(4) regression on FreeBSD 7-STABLE
Date: Wed, 7 May 2008 13:33:13 +0200

 --Apple-Mail-24--75440171
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed;
 	delsp=yes
 Content-Transfer-Encoding: 7bit
 
 Hello,
 
 Forget the previous email, the NIC still stops sending packets with  
 that version of the driver (if_re.c 1.95.2.13).
 It just happened.
 
 I have nothing in log files, but named complaining: error sending  
 response: not enough free resources
 
 Reverting to 1.95.2.6 of if_re.c, that version looked stable.
 --Apple-Mail-24--75440171
 Content-Type: text/html;
 	charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 <html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>Forget the previous email, the NIC still stops sending packets with that version of the driver (if_re.c&nbsp;<span class="Apple-style-span" style="font-family: verdana; font-size: 11px; ">1.95.2.13).</span></div><div>It just happened.</div><div><br></div><div>I have nothing in log files, but named complaining:&nbsp;error sending response: not enough free resources</div><div ><br></div><div>Reverting to 1.95.2.6 of if_re.c, that version looked stable.</div></body></html>
 --Apple-Mail-24--75440171--

From: Frank Denis <j@pureftpd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/123202: [re] [regression] if_re(4) regression on FreeBSD
	7-STABLE
Date: Wed, 7 May 2008 22:16:14 +0200

   1.95.2.6 is not stable either, the lockup happened again.
   
   Back to the -RELEASE version that works for sure.
   
   yongari@ if there is anything I might do in order to give you traces that
 might help you diagnose what's going on, just ask.
 
   Best regards,
     -Frank.

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, j@pureftpd.org
Cc:  
Subject: Re: kern/123202: [re] [regression] if_re(4) regression on FreeBSD
 7-STABLE
Date: Wed, 11 Jun 2008 11:05:31 +0200

 Try to apply the latest patch from yongari, it works against HEAD and 
 7-STABLE:
 http://people.freebsd.org/~yongari/re/
 
 The latest current patch:
 http://people.freebsd.org/~yongari/re/re.HEAD.20080610
State-Changed-From-To: feedback->closed 
State-Changed-By: yongari 
State-Changed-When: Wed Mar 18 05:19:41 UTC 2009 
State-Changed-Why:  
Close PR. Submitter confirmed stable fixed the issue. I forgot 
his reply as submitter directly mailed to me. 

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