From andre.albsmeier@siemens.com  Mon Jan  3 06:50:24 2005
Return-Path: <andre.albsmeier@siemens.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A7E0A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Jan 2005 06:50:24 +0000 (GMT)
Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8B01A43D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Jan 2005 06:50:23 +0000 (GMT)
	(envelope-from andre.albsmeier@siemens.com)
Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14])
	by goliath.siemens.de (8.12.6/8.12.6) with ESMTP id j036oMVi000031
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Jan 2005 07:50:22 +0100
Received: from mars.cert.siemens.com (mars.cert.siemens.com [139.25.19.9])
	by mail1.siemens.de (8.12.6/8.12.6) with ESMTP id j036oMPQ023161
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Jan 2005 07:50:22 +0100
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7])
	by mars.cert.siemens.com (8.13.2/8.13.2/$SiemensCERT: mail/cert.mc.pre,v 1.65 2004/10/29 21:53:46 mailadm Exp $) with ESMTP id j036oMto091161
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Jan 2005 07:50:22 +0100 (CET)
Received: (from localhost)
	by curry.mchp.siemens.de (8.13.1/8.13.1) id j036oMYX052397
	for FreeBSD-gnats-submit@freebsd.org; Mon, 3 Jan 2005 07:50:22 +0100 (CET)
Message-Id: <200501030650.j036oLlr024930@curry.mchp.siemens.de>
Date: Mon, 3 Jan 2005 07:50:21 +0100 (CET)
From: Andre Albsmeier <andre.albsmeier@siemens.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Intel Etherexpress 10MBit broken since recent commit to fxp driver
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         75739
>Category:       kern
>Synopsis:       Intel Etherexpress 10MBit broken since recent commit to fxp driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mux
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 03 07:00:45 GMT 2005
>Closed-Date:    Tue Jan 04 19:33:06 GMT 2005
>Last-Modified:  Tue Jan 04 19:33:06 GMT 2005
>Originator:     Andre Albsmeier
>Release:        FreeBSD 4.11-RC1 i386
>Organization:
>Environment:

	 FreeBSD 4.11-RC1 using an Intel Etherexpress 10MBit

>Description:

This commit:

 mux         2004-12-28 22:49:24 UTC

   FreeBSD src repository

   Modified files:        (Branch: RELENG_4)
     sys/dev/fxp          if_fxp.c
   Log:
   Merge if_fxp.c:1.220 from HEAD to RELENG_4:

     date: 2004/12/20 10:18:21;  author: mux;  state: Exp;  lines: +2 -2
     Only try to use the 82503 serial interface for the 82557 chipsets.  The
     datasheet says it is only valid for such chipsets and shouldn't be used
     with others.  This fixes some 82559 based cards which otherwise only
     work at 10Mbit.

broke the Intel Etherexpress 10MBit card which has an
INTEL S82557 and a SEEQ NQ80C24 chip on them:

fxp1: <Intel 82557 Pro/100 Ethernet> port 0xb800-0xb81f mem
0xe0800000-0xe08fffff,0xe3800000-0xe3800fff irq 10 at device 11.0 on pci0
fxp1: Ethernet address 00:a0:c9:a9:1d:06
fxp1: MII without any PHY!
device_probe_and_attach: fxp1 attach returned 6

>How-To-Repeat:

	Boot a recent 4.11-RC1 with the above card and try
	to use it.

>Fix:

	I assume the patch is not correct but it works here:

--- if_fxp.c.ORI	Fri Dec 31 16:40:32 2004
+++ if_fxp.c	Fri Dec 31 17:01:15 2004
@@ -511,7 +511,7 @@
 	 * Determine whether we must use the 503 serial interface.
 	 */
 	fxp_read_eeprom(sc, &data, 6, 1);
-	if (sc->revision == FXP_REV_82557 && (data & FXP_PHY_DEVICE_MASK) != 0
+	if ((sc->revision == 0 || sc->revision == FXP_REV_82557) && (data & FXP_PHY_DEVICE_MASK) != 0
 	    && (data & FXP_PHY_SERIAL_ONLY))
 		sc->flags |= FXP_FLAG_SERIAL_MEDIA;
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mux 
Responsible-Changed-By: simon 
Responsible-Changed-When: Mon Jan 3 10:46:36 GMT 2005 
Responsible-Changed-Why:  
Over to the committer who did the MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75739 
State-Changed-From-To: open->closed 
State-Changed-By: mux 
State-Changed-When: Tue Jan 4 19:31:16 GMT 2005 
State-Changed-Why:  
I've just committed a fix to HEAD which should fix the problems.  I'll see 
with the release engineering team wether this commit should be merged as 
as well, or if it's safer to just backout the original commit.  In any 
case, thanks for reporting the problem. 

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