>Number: 151409
>Category: amd64
>Synopsis: Problem with Marvell driver, e1000phy.c
>Confidential: no
>Severity: serious
>Priority: low
>Responsible:freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Oct 12 15:40:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Steve Cochran
>Release:8.1R
>Organization:
University of Missouri System
>Environment:
FreeBSD shaggy.netsys.more.net 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #12: Sun
Oct 10 14:29:31 CDT 2010
r...@shaggy.netsys.more.net:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
After upgrading from 7.2R to 8.1R I had serious problems with the build-in
Ethernet ports on my server. As soon as the OS initialized the port the LEDs
looked wrong: activity LED on solid and speed indicator off. It would come up
in half-duplex regardless of the setting on the connected switch and any
attempt to force full-duplex operation would apparently cause the port to hang
completely. Sometimes it would pass traffic in half-duplex mode (but at low
speeds and with errors), sometimes it wouldn't pass traffic at all.
I couldn't find any mention of similar problems on Google so I compared some
kernel files between 7.2 and 8.1 and found that dev/mii/e1000phy.c had some
significant differences. I tried iteratively backing out some changes but
didn't have much luck building a working driver. I'm not a kernel hacker and
know very little about Ethernet drivers or Marvell hardware so I only had a dim
idea of what I was doing. Eventually I just modified the driver in 8.1 to match
the one from 7.2 ( __FBSDID("$FreeBSD: src/sys/dev/mii/e1000phy.c,v
1.18.2.4.2.1 2009/04/15 03:14:26 kensmith Exp $") ) as much as possible. This
finally gave me a working driver.
Here are the relevant lines from dmesg.
Copyright (c) 1992-2010 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 8.1-RELEASE-p1 #12: Sun Oct 10 14:29:31 CDT 2010
r...@shaggy.netsys.more.net:/usr/obj/usr/src/sys/GENERIC amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Quad-Core AMD Opteron(tm) Processor 1354 (2200.10-MHz K8-class CPU)
Origin = "AuthenticAMD" Id = 0x100f23 Family = 10 Model = 2 Stepping = 3
Features=0x178bfbff
Features2=0x802009
AMD
Features=0xee500800
AMD Features2=0x7ff
TSC: P-state invariant
real memory = 4294967296 (4096 MB)
avail memory = 4110999552 (3920 MB)
ACPI APIC Table: <061908 APIC1103>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
cpu2 (AP): APIC ID: 2
cpu3 (AP): APIC ID: 3
..
nfe0: port 0xb400-0xb407 mem
0xfeaf6000-0xfeaf6fff,0xfeafa800-0xfeafa8ff,0xfeafa400-0xfeafa40f irq 22 at
device 8.0 on pci0
miibus0: on nfe0
e1000phy0: PHY 2 on miibus0
e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-FDX, auto
nfe0: Ethernet address: 00:e0:81:b5:f1:04
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe1: port 0xb080-0xb087 mem
0xfeaf5000-0xfeaf5fff,0xfeafa000-0xfeafa0ff,0xfeaf4c00-0xfeaf4c0f irq 23 at
device 9.0 on pci0
miibus1: on nfe1
e1000phy1: PHY 3 on miibus1
e1000phy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-FDX, auto
nfe1: Ethernet address: 00:e0:81:b5:f1:05
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
nfe1: [FILTER]
..
>How-To-Repeat:
The server showing the problem has a Tyan Tomcat n3400B Opteron motherboard
with NVIDIA nForce MCP55 chipset and Marvell 88E1116 Ethernet controller. I
assume any server with similar hardware would show the same problem. Given the
lack of cries in the mailing lists I'm guessing this isn't all that common a
setup.
>Fix:
I'd submit the working version of e1000phy.c that I came up with but I'm pretty
sure I broke support for some newer Marvell chipsets in the process of fixing
my own. It is mostly identical to src/sys/dev/mii/e1000phy.c,v 1.18.2.4.2.1
but with the necessary changes to make it work with the 8.1 kernel.
>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "freebsd-amd64-unsubscr...@freebsd.org"