From nobody@FreeBSD.org  Sun Sep 17 17:44:49 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 29C5016A4C8
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 17:44:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3398143D46
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 17:44:47 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8HHikae010209
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Sep 2006 17:44:46 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k8HHikCg010208;
	Sun, 17 Sep 2006 17:44:46 GMT
	(envelope-from nobody)
Message-Id: <200609171744.k8HHikCg010208@www.freebsd.org>
Date: Sun, 17 Sep 2006 17:44:46 GMT
From: Artem <artemkm@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
X-Send-Pr-Version: www-2.3

>Number:         103332
>Category:       kern
>Synopsis:       [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 17 17:50:25 GMT 2006
>Closed-Date:    Wed Jul 06 00:41:18 UTC 2011
>Last-Modified:  Wed Jul 06 00:41:18 UTC 2011
>Originator:     Artem
>Release:        6.1 AMD64
>Organization:
>Environment:
FreeBSD test 6.1-RELEASE-p6 FreeBSD 6.1-RELEASE-p6 #0: Sat Sep  9 23:18:27 MSD 2006     root@test:/usr/obj/usr/src/sys/my  amd64
>Description:
If "link0" option used for  Intel 82550, network adapter will work only with ICMP. If  link0 is off (ifconfig fxp1 -link0) card will work correctly. This behaviour is fair for both IA32 and AMD64 architecture.

In FreeBSD 4.11 (IA 32) option "link0" work correctly.

Hardware:

dmesg:

Copyright (c) 1992-2006 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 6.1-RELEASE-p6 #0: Sat Sep  9 23:18:27 MSD 2006
    root@test:/usr/obj/usr/src/sys/my
ACPI APIC Table: <AMIINT VIA_K8  >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3200+ (2000.08-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0xf48  Stepping = 8
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  AMD Features=0xe0500800<SYSCALL,NX,MMX+,LM,3DNow+,3DNow>
real memory  = 1073676288 (1023 MB)
avail memory = 1027653632 (980 MB)
ioapic0 <Version 0.3> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <AMIINT VIA_K8> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
device_attach: acpi_perf0 attach returned 6
acpi_throttle0: <ACPI CPU Throttling> on cpu0
device_attach: acpi_perf0 attach returned 6
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 8385 host to PCI bridge> mem 0xd0000000-0xd7ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
drm0: <ATI Radeon RV280 9200> port 0xa800-0xa8ff mem 0xc0000000-0xc7ffffff,0xcfaf0000-0xcfafffff irq 16 at device 0.0 on pci1
info: [drm] AGP at 0xd0000000 128MB
info: [drm] Initialized radeon 1.19.0 20050911
pci1: <display> at device 0.1 (no driver attached)
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xe400-0xe43f mem 0xcfffe000-0xcfffefff,0xcfe00000-0xcfefffff irq 17 at device 6.0 on pci0
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:90:27:28:93:d1
pcm0: <Creative Audigy 2 (EMU10K2)> port 0xe000-0xe03f irq 18 at device 7.0 on pci0
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
fwohci0: <1394 Open Host Controller Interface> mem 0xcfffd800-0xcfffdfff,0xcfff8000-0xcfffbfff irq 19 at device 7.2 on pci0
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:02:3c:01:51:07:d4:d2
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:02:3c:07:d4:d2
fwe0: Ethernet address: 02:02:3c:07:d4:d2
fwe0: if_start running deferred for Giant
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
fxp1: <Intel 82550 Pro/100 Ethernet> port 0xdc00-0xdc3f mem 0xcfffc000-0xcfffcfff,0xcffa0000-0xcffbffff irq 19 at device 8.0 on pci0
miibus1: <MII bus> on fxp1
inphy1: <i82555 10/100 media interface> on miibus1
inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1: Ethernet address: 00:02:b3:4c:d8:4a
ahc0: <Adaptec 19160B Ultra160 SCSI adapter> port 0xe800-0xe8ff mem 0xcffff000-0xcfffffff irq 17 at device 10.0 on pci0
ahc0: [GIANT-LOCKED]
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
atapci0: <VIA 6420 SATA150 controller> port 0xd800-0xd807,0xd400-0xd403,0xd000-0xd007,0xcc00-0xcc03,0xc800-0xc80f,0xc400-0xc4ff irq 20 at device 15.0 on pci0
ata2: <ATA channel 0> on atapci0
ata3: <ATA channel 1> on atapci0
atapci1: <VIA 8237 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 15.1 on pci0
ata0: <ATA channel 0> on atapci1
ata1: <ATA channel 1> on atapci1
uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 21 at device 16.0 on pci0
uhci0: [GIANT-LOCKED]
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 0xb800-0xb81f irq 21 at device 16.1 on pci0
uhci1: [GIANT-LOCKED]
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
uhci2: <VIA 83C572 USB controller> port 0xbc00-0xbc1f irq 21 at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
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
uhci3: <VIA 83C572 USB controller> port 0xc000-0xc01f irq 21 at device 16.3 on pci0
uhci3: [GIANT-LOCKED]
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
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xcfffd600-0xcfffd6ff irq 21 at device 16.4 on pci0
ehci0: [GIANT-LOCKED]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <VIA VT6202 USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
acpi_button1: <Sleep Button> on acpi0
fdc0: <floppy drive controller> port 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
orm0: <ISA Option ROMs> at iomem 0xc0000-0xccfff,0xd2800-0xd37ff,0xd3800-0xd4fff on isa0
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
ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/11.10, addr 2, iclass 3/1
ums0: 3 buttons and Z dir.
Timecounter "TSC" frequency 2000082479 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to deny, logging disabled
Waiting 5 seconds for SCSI devices to settle
ad0: 58643MB <IC35L060AVVA07 0 VA3OA50K> at ata0-master UDMA100
acd0: DVDR <TEAC DV-W58G-A/U4S2> at ata1-master UDMA33
acd1: CDRW <CR-48XATE/1.0E> at ata1-slave UDMA33
da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST373307LW 0007> Fixed Direct Access SCSI-3 device
da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da0: 70007MB (143374744 512 byte sectors: 255H 63S/T 8924C)
da1 at ahc0 bus 0 target 1 lun 0
da1: <SEAGATE ST373207LW 0003> Fixed Direct Access SCSI-3 device
da1: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da1: 70007MB (143374744 512 byte sectors: 255H 63S/T 8924C)
........
fxp1: Microcode loaded, int_delay: 1000 usec  bundle_max: 6



pciconf -lv
agp0@pci0:0:0:  class=0x060000 card=0x31881106 chip=0x31881106 rev=0x01 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'Apollo K8T800 CPU to PCI Bridge'
    class    = bridge
    subclass = HOST-PCI
pcib1@pci0:1:0: class=0x060400 card=0x00000080 chip=0xb1881106 rev=0x00 hdr=0x01
    vendor   = 'VIA Technologies Inc'
    device   = 'Apollo K8HTB CPU to AGP 2.0/3.0 Bridge'
    class    = bridge
    subclass = PCI-PCI
fxp0@pci0:6:0:  class=0x020000 card=0x000c8086 chip=0x12298086 rev=0x08 hdr=0x00
    vendor   = 'Intel Corporation'
    device   = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class    = network
    subclass = ethernet
pcm0@pci0:7:0:  class=0x040100 card=0x20021102 chip=0x00041102 rev=0x04 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'SoundBlaster Audigy Audigy Audio Processor'
    class    = multimedia
    subclass = audio
emujoy0@pci0:7:1:       class=0x098000 card=0x00401102 chip=0x70031102 rev=0x04 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'EMU10K2 Audigy Gameport'
    class    = input device
fwohci0@pci0:7:2:       class=0x0c0010 card=0x00101102 chip=0x40011102 rev=0x04 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'EMU10K2 Audigy IEEE1394 Firewire Controller'
    class    = serial bus
    subclass = FireWire
fxp1@pci0:8:0:  class=0x020000 card=0x00408086 chip=0x12298086 rev=0x0d hdr=0x00
    vendor   = 'Intel Corporation'
    device   = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class    = network
    subclass = ethernet
ahc0@pci0:10:0: class=0x010000 card=0x62a19005 chip=0x00819005 rev=0x02 hdr=0x00
    vendor   = 'Adaptec Inc'
    device   = '19160 AIC-7892B Ultra160 SCSI Adapter'
    class    = mass storage
    subclass = SCSI
atapci0@pci0:15:0:      class=0x010400 card=0x70201462 chip=0x31491106 rev=0x80 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT8237  VT6410 SATA RAID Controller'
    class    = mass storage
    subclass = RAID
atapci1@pci0:15:1:      class=0x01018a card=0x70201462 chip=0x05711106 rev=0x06 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82xxxx EIDE Controller (All VIA Chipsets)'
    class    = mass storage
    subclass = ATA
uhci0@pci0:16:0:        class=0x0c0300 card=0x70201462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class    = serial bus
    subclass = USB
uhci1@pci0:16:1:        class=0x0c0300 card=0x70201462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class    = serial bus
    subclass = USB
uhci2@pci0:16:2:        class=0x0c0300 card=0x70201462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class    = serial bus
    subclass = USB
uhci3@pci0:16:3:        class=0x0c0300 card=0x70201462 chip=0x30381106 rev=0x81 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82xxxxx UHCI USB 1.1 Controller (All VIA Chipsets)'
    class    = serial bus
    subclass = USB
ehci0@pci0:16:4:        class=0x0c0320 card=0x70201462 chip=0x31041106 rev=0x86 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT6202 USB 2.0 Enhanced Host Controller'
    class    = serial bus
    subclass = USB
isab0@pci0:17:0:        class=0x060100 card=0x32271106 chip=0x32271106 rev=0x00 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT8237 PCI-to-ISA Bridge'
    class    = bridge
    subclass = PCI-ISA
hostb0@pci0:24:0:       class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron HyperTransport Technology Configuration'
    class    = bridge
    subclass = HOST-PCI
hostb1@pci0:24:1:       class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Address Map'
    class    = bridge
    subclass = HOST-PCI
hostb2@pci0:24:2:       class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron DRAM Controller'
    class    = bridge
    subclass = HOST-PCI
hostb3@pci0:24:3:       class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Miscellaneous Control'
    class    = bridge
    subclass = HOST-PCI
drm0@pci1:0:0:  class=0x030000 card=0x0130174b chip=0x59601002 rev=0x01 hdr=0x00
    vendor   = 'ATI Technologies Inc'
    device   = 'RV280 Radeon 9200 Pro'
    class    = display
    subclass = VGA
none0@pci1:0:1: class=0x038000 card=0x0131174b chip=0x59401002 rev=0x01 hdr=0x00
    vendor   = 'ATI Technologies Inc'
    device   = 'RV280 Radeon 9200 Pro - Secondary'
    class    = display

fxp1@pci0:8:0:  class=0x020000 card=0x00408086 chip=0x12298086 rev=0x0d hdr=0x00
    vendor   = 'Intel Corporation'
    device   = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class    = network
    subclass = ethernet


ifconfig fxp1

fxp1: flags=9843<UP,BROADCAST,RUNNING,SIMPLEX,LINK0,MULTICAST> mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet 192.168.11.43 netmask 0xffffff00 broadcast 192.168.11.255
        ether 00:02:b3:4c:d8:4a
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active


>How-To-Repeat:
Hardvare: intel 82550 card

ifconfig fxp_ link0
>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mux 
Responsible-Changed-By: bms 
Responsible-Changed-When: Mon Sep 25 17:33:53 UTC 2006 
Responsible-Changed-Why:  
mux is mr fxp 

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

Adding to audit trail from misfiled PR kern/118909:

Date: Thu, 20 Dec 2007 23:15:47 +0100
From: "Florian Heigl" <florian.heigl@gmail.com>
 
 Bug still exists in 6.2-RELEASE-p9 (used i.e. in FreeNAS)
 As can imagine this bug is quite frustrating - offloading works fine
 on my cheap / older 82559 onboard nic but will temporarily brick the
 sweet 64bit dual 82550 nic.
 
 I can test this against 7-stable but to be honest I get the impression
 noone even looked at this issue over the last year?! I'll gladly help
 debug this as soon as the bug gets picked up.
 Right now this seems a waste of time i'll rather spend an hour to go
 buy another card.
 
 Still, this feels SO linux. :(
 
 -- 
 'Sie brauchen sich um Ihre Zukunft keine Gedanken zu machen'
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Thu Dec 4 04:46:51 UTC 2008 
State-Changed-Why:  
I also seen the same issue on 82550. I don't even know whether 
microcode for 82550 ever worked. Linux also doesn't have microcode 
for 82550. Btw, what is the primary reason for you to load microcode 
for 82550? Are you suffering from huge number of interrupts on 
82550? 


Responsible-Changed-From-To: mux->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Thu Dec 4 04:46:51 UTC 2008 
Responsible-Changed-Why:  
Grab. 

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

From: Andreas Longwitz <longwitz@incore.de>
To: bug-followup@freebsd.org,
 artemkm@yahoo.com
Cc:  
Subject: Re: kern/103332: [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
Date: Mon, 8 Jun 2009 21:08:50 +0200

 --Boundary-00=_CHWLKOW00MJU5eC
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 All my onboard chips Intel 82550 with revision 0x0c/0x0d have the bug 
 mentioned in rcvbundle.h: a standard nfs_mount using such an interface with 
 some traffic lets the client hang. Therefore the link0 option is necessary to 
 load the microcode from rcvbundle.h.
 
 The link0 option is broken probable since the introduction of the busdma API 
 in revision 1.152 of if_fxp.c. The appended patch solved the problem for me 
 in 6.4 Stable.
 
 Best regards
 
 Dr. Andreas Longwitz, Data Service GmbH, Beethovenstr. 2A, 23617 Stockelsdorf
 
 --Boundary-00=_CHWLKOW00MJU5eC
 Content-Type: text/x-diff;
   charset="iso 8859-15";
   name="patch.if_fxp.c.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="patch.if_fxp.c.diff"
 
 --- if_fxp.c.orig	2007-04-11 19:13:16.000000000 +0200
 +++ if_fxp.c	2009-06-06 00:29:28.000000000 +0200
 @@ -2680,6 +2680,7 @@
  	    sc->tunable_int_delay, 
  	    uc->bundle_max_offset == 0 ? 0 : sc->tunable_bundle_max);
  	sc->flags |= FXP_FLAG_UCODE;
 +	bzero(cbp, (uc->length + 2) * sizeof(uint32_t));
  }
  
  static int
 
 --Boundary-00=_CHWLKOW00MJU5eC--

From: Pyun YongHyeon <pyunyh@gmail.com>
To: Andreas Longwitz <longwitz@incore.de>
Cc: yongari@freebsd.org, bug-followup@FreeBSD.org
Subject: Re: kern/103332: [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
Date: Tue, 9 Jun 2009 15:57:53 +0900

 On Mon, Jun 08, 2009 at 07:40:07PM +0000, Andreas Longwitz wrote:
 > The following reply was made to PR kern/103332; it has been noted by GNATS.
 > 
 > From: Andreas Longwitz <longwitz@incore.de>
 > To: bug-followup@freebsd.org,
 >  artemkm@yahoo.com
 > Cc:  
 > Subject: Re: kern/103332: [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
 > Date: Mon, 8 Jun 2009 21:08:50 +0200
 > 
 >  --Boundary-00=_CHWLKOW00MJU5eC
 >  Content-Type: text/plain;
 >    charset="us-ascii"
 >  Content-Transfer-Encoding: 7bit
 >  Content-Disposition: inline
 >  
 >  All my onboard chips Intel 82550 with revision 0x0c/0x0d have the bug 
 >  mentioned in rcvbundle.h: a standard nfs_mount using such an interface with 
 >  some traffic lets the client hang. Therefore the link0 option is necessary to 
 >  load the microcode from rcvbundle.h.
 >  
 >  The link0 option is broken probable since the introduction of the busdma API 
 >  in revision 1.152 of if_fxp.c. The appended patch solved the problem for me 
 >  in 6.4 Stable.
 >  
 
 Hmm, the patch just clears the load microcode command field after
 the completion of the command. I don't see how it can fix microcode
 issues on i82550. Actually I tried the patch on i82550 rev C
 controller and it still spews SCB timeouts.
 Would you shed light on me why you think it fixes the issue?
 
 BTW, if you're suffering from hang on i82550 it could be related
 with NFS over UDP. Does NFS over TCP also show the same issue?
 
 >  Best regards
 >  
 >  Dr. Andreas Longwitz, Data Service GmbH, Beethovenstr. 2A, 23617 Stockelsdorf
 >  
 >  --Boundary-00=_CHWLKOW00MJU5eC
 >  Content-Type: text/x-diff;
 >    charset="iso 8859-15";
 >    name="patch.if_fxp.c.diff"
 >  Content-Transfer-Encoding: 7bit
 >  Content-Disposition: attachment;
 >  	filename="patch.if_fxp.c.diff"
 >  
 >  --- if_fxp.c.orig	2007-04-11 19:13:16.000000000 +0200
 >  +++ if_fxp.c	2009-06-06 00:29:28.000000000 +0200
 >  @@ -2680,6 +2680,7 @@
 >   	    sc->tunable_int_delay, 
 >   	    uc->bundle_max_offset == 0 ? 0 : sc->tunable_bundle_max);
 >   	sc->flags |= FXP_FLAG_UCODE;
 >  +	bzero(cbp, (uc->length + 2) * sizeof(uint32_t));
 >   }
 >   
 >   static int
 >  
 >  --Boundary-00=_CHWLKOW00MJU5eC--

From: Andreas Longwitz <longwitz@incore.de>
To: pyunyh@gmail.com
Cc: yongari@freebsd.org,
 bug-followup@freebsd.org
Subject: Re: kern/103332: [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
Date: Tue, 9 Jun 2009 22:59:26 +0200

 > Hmm, the patch just clears the load microcode command field after
 > the completion of the command. I don't see how it can fix microcode
 > issues on i82550. 
 The patch clears the memory buffer used by the microcode loading routine, 
 because one of the later driver routines seems to be confused otherwise. The 
 microcode itself is the same used in 4.11 and I do not want to change it.
 
 > Actually I tried the patch on i82550 rev C 
 > controller and it still spews SCB timeouts.
 > Would you shed light on me why you think it fixes the issue?
 In 6.4 Stable I see the following behavior:
   i82550 rev C is always ok, I may use the link0 flag
   i82550 rev D without link0 flag: hang on 8kB udp packets,
    the driver gives SCB timeouts: 0x80 0xe0 0x50 0x400
   i82550 rev D with link0 flag: only ICMP works
   i82550 rev D with link0 flag and memory clean patch: ok.
 
 > BTW, if you're suffering from hang on i82550 it could be related
 > with NFS over UDP. 
 Yes. But I have other application with fragmented UDP traffic too.
 
 > Does NFS over TCP also show the same issue? 
 No, only UDP is concerned.
 
 Dr. Andreas Longwitz, Data Service GmbH, Beethovenstr. 2A, 23617 Stockelsdorf

From: Pyun YongHyeon <pyunyh@gmail.com>
To: Andreas Longwitz <longwitz@incore.de>
Cc: yongari@freebsd.org, bug-followup@freebsd.org
Subject: Re: kern/103332: [fxp] fxp driver does not work correctly on Intel 82550, if "link0" options will be turned on
Date: Wed, 10 Jun 2009 10:00:27 +0900

 On Tue, Jun 09, 2009 at 10:59:26PM +0200, Andreas Longwitz wrote:
 > > Hmm, the patch just clears the load microcode command field after
 > > the completion of the command. I don't see how it can fix microcode
 > > issues on i82550. 
 > The patch clears the memory buffer used by the microcode loading routine, 
 > because one of the later driver routines seems to be confused otherwise. The 
 
 Yeah I thought that too. But this does not explain why 82558 and
 82559 works with loaded microcode while my 82550 does not work.
 The only SCB command that does not clear cbl_list is multicast
 setup command. However it would not matter because the next command
 field of MC setup is set to 0xffffffff. I have to check MC setup
 command again because the command has severe limitation and is very
 tricky.
 
 > microcode itself is the same used in 4.11 and I do not want to change it.
 > 
 > > Actually I tried the patch on i82550 rev C 
 > > controller and it still spews SCB timeouts.
 > > Would you shed light on me why you think it fixes the issue?
 > In 6.4 Stable I see the following behavior:
 >   i82550 rev C is always ok, I may use the link0 flag
 >   i82550 rev D without link0 flag: hang on 8kB udp packets,
 >    the driver gives SCB timeouts: 0x80 0xe0 0x50 0x400
 >   i82550 rev D with link0 flag: only ICMP works
 >   i82550 rev D with link0 flag and memory clean patch: ok.
 > 
 
 Ok, now I know the microcode worked before bus_dma(9) changes. Not
 sure the root cause is bus_dma(9) changes.
 
 > > BTW, if you're suffering from hang on i82550 it could be related
 > > with NFS over UDP. 
 > Yes. But I have other application with fragmented UDP traffic too.
 > 
 > > Does NFS over TCP also show the same issue? 
 > No, only UDP is concerned.
 > 
 
 Ok.
State-Changed-From-To: feedback->open 
State-Changed-By: yongari 
State-Changed-When: Fri Jun 12 05:57:06 UTC 2009 
State-Changed-Why:  
Another user confirmed microcode loading used to work on i82550. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103332 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Tue Jul 6 19:14:12 UTC 2010 
State-Changed-Why:  
There was a some initialization change which may affect configure 
command of 82550. Would you try fxp(4) on 8.1-RC2 or 7.3-RELEASE 
and let me know whether link0 option works or not? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103332 
State-Changed-From-To: feedback->open 
State-Changed-By: yongari 
State-Changed-When: Tue Jul 6 19:20:14 UTC 2010 
State-Changed-Why:  
Mail bounced, keep PR open until I have a chance to test it on 82550. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/103332: commit references a PR
Date: Mon, 27 Jun 2011 21:27:22 +0000 (UTC)

 Author: yongari
 Date: Mon Jun 27 21:27:12 2011
 New Revision: 223608
 URL: http://svn.freebsd.org/changeset/base/223608
 
 Log:
   Disable microcode loading for 82550 and 82550C controllers. Loading
   the microcode caused SCB timeouts. Linux driver does not allow
   microcode loading for these controllers and jfv also confirmed that
   there is no need to do and it shouldn't.
   
   PR:				kern/103332
   Additional confirmation from:	jfv
   MFC after:			1 week
 
 Modified:
   head/sys/dev/fxp/if_fxp.c
 
 Modified: head/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- head/sys/dev/fxp/if_fxp.c	Mon Jun 27 21:14:25 2011	(r223607)
 +++ head/sys/dev/fxp/if_fxp.c	Mon Jun 27 21:27:12 2011	(r223608)
 @@ -3012,8 +3012,10 @@ static uint32_t fxp_ucode_d101a[] = D101
  static uint32_t fxp_ucode_d101b0[] = D101_B0_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101ma[] = D101M_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101s[] = D101S_RCVBUNDLE_UCODE;
 +#ifdef notyet
  static uint32_t fxp_ucode_d102[] = D102_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d102c[] = D102_C_RCVBUNDLE_UCODE;
 +#endif
  static uint32_t fxp_ucode_d102e[] = D102_E_RCVBUNDLE_UCODE;
  
  #define UCODE(x)	x, sizeof(x)/sizeof(uint32_t)
 @@ -3031,10 +3033,12 @@ static const struct ucode {
  	    D101M_CPUSAVER_DWORD, D101M_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82559S_A, UCODE(fxp_ucode_d101s),
  	    D101S_CPUSAVER_DWORD, D101S_CPUSAVER_BUNDLE_MAX_DWORD },
 +#ifdef notyet
  	{ FXP_REV_82550, UCODE(fxp_ucode_d102),
  	    D102_B_CPUSAVER_DWORD, D102_B_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82550_C, UCODE(fxp_ucode_d102c),
  	    D102_C_CPUSAVER_DWORD, D102_C_CPUSAVER_BUNDLE_MAX_DWORD },
 +#endif
  	{ FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
  	    D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ 0, NULL, 0, 0, 0 }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: yongari 
State-Changed-When: Mon Jun 27 21:40:14 UTC 2011 
State-Changed-Why:  
I disabled loading microcode for 82550/82550C. I don't see any 
problems on microcode loading scheme. Linux e100 driver does not 
load it and I guess the microcode is broken. jfv@ from Intel also 
confirmed that it's not needed and it should try to load it. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/103332: commit references a PR
Date: Tue,  5 Jul 2011 23:17:36 +0000 (UTC)

 Author: yongari
 Date: Tue Jul  5 23:17:27 2011
 New Revision: 223807
 URL: http://svn.freebsd.org/changeset/base/223807
 
 Log:
   MFC r223608:
     Disable microcode loading for 82550 and 82550C controllers. Loading
     the microcode caused SCB timeouts. Linux driver does not allow
     microcode loading for these controllers and jfv also confirmed that
     there is no need to do and it shouldn't.
   
     PR:				kern/103332
     Additional confirmation from:	jfv
 
 Modified:
   stable/8/sys/dev/fxp/if_fxp.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
 
 Modified: stable/8/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- stable/8/sys/dev/fxp/if_fxp.c	Tue Jul  5 20:05:06 2011	(r223806)
 +++ stable/8/sys/dev/fxp/if_fxp.c	Tue Jul  5 23:17:27 2011	(r223807)
 @@ -3014,8 +3014,10 @@ static uint32_t fxp_ucode_d101a[] = D101
  static uint32_t fxp_ucode_d101b0[] = D101_B0_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101ma[] = D101M_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101s[] = D101S_RCVBUNDLE_UCODE;
 +#ifdef notyet
  static uint32_t fxp_ucode_d102[] = D102_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d102c[] = D102_C_RCVBUNDLE_UCODE;
 +#endif
  static uint32_t fxp_ucode_d102e[] = D102_E_RCVBUNDLE_UCODE;
  
  #define UCODE(x)	x, sizeof(x)/sizeof(uint32_t)
 @@ -3033,10 +3035,12 @@ static const struct ucode {
  	    D101M_CPUSAVER_DWORD, D101M_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82559S_A, UCODE(fxp_ucode_d101s),
  	    D101S_CPUSAVER_DWORD, D101S_CPUSAVER_BUNDLE_MAX_DWORD },
 +#ifdef notyet
  	{ FXP_REV_82550, UCODE(fxp_ucode_d102),
  	    D102_B_CPUSAVER_DWORD, D102_B_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82550_C, UCODE(fxp_ucode_d102c),
  	    D102_C_CPUSAVER_DWORD, D102_C_CPUSAVER_BUNDLE_MAX_DWORD },
 +#endif
  	{ FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
  	    D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ 0, NULL, 0, 0, 0 }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/103332: commit references a PR
Date: Tue,  5 Jul 2011 23:18:37 +0000 (UTC)

 Author: yongari
 Date: Tue Jul  5 23:18:28 2011
 New Revision: 223808
 URL: http://svn.freebsd.org/changeset/base/223808
 
 Log:
   MFC r223608:
     Disable microcode loading for 82550 and 82550C controllers. Loading
     the microcode caused SCB timeouts. Linux driver does not allow
     microcode loading for these controllers and jfv also confirmed that
     there is no need to do and it shouldn't.
   
     PR:				kern/103332
     Additional confirmation from:	jfv
 
 Modified:
   stable/7/sys/dev/fxp/if_fxp.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- stable/7/sys/dev/fxp/if_fxp.c	Tue Jul  5 23:17:27 2011	(r223807)
 +++ stable/7/sys/dev/fxp/if_fxp.c	Tue Jul  5 23:18:28 2011	(r223808)
 @@ -3007,8 +3007,10 @@ static uint32_t fxp_ucode_d101a[] = D101
  static uint32_t fxp_ucode_d101b0[] = D101_B0_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101ma[] = D101M_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d101s[] = D101S_RCVBUNDLE_UCODE;
 +#ifdef notyet
  static uint32_t fxp_ucode_d102[] = D102_B_RCVBUNDLE_UCODE;
  static uint32_t fxp_ucode_d102c[] = D102_C_RCVBUNDLE_UCODE;
 +#endif
  static uint32_t fxp_ucode_d102e[] = D102_E_RCVBUNDLE_UCODE;
  
  #define UCODE(x)	x, sizeof(x)/sizeof(uint32_t)
 @@ -3026,10 +3028,12 @@ static const struct ucode {
  	    D101M_CPUSAVER_DWORD, D101M_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82559S_A, UCODE(fxp_ucode_d101s),
  	    D101S_CPUSAVER_DWORD, D101S_CPUSAVER_BUNDLE_MAX_DWORD },
 +#ifdef notyet
  	{ FXP_REV_82550, UCODE(fxp_ucode_d102),
  	    D102_B_CPUSAVER_DWORD, D102_B_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ FXP_REV_82550_C, UCODE(fxp_ucode_d102c),
  	    D102_C_CPUSAVER_DWORD, D102_C_CPUSAVER_BUNDLE_MAX_DWORD },
 +#endif
  	{ FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
  	    D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
  	{ 0, NULL, 0, 0, 0 }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: yongari 
State-Changed-When: Wed Jul 6 00:40:55 UTC 2011 
State-Changed-Why:  
Close, MFCed to both stable/8 and stable/7. 

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