From nobody@FreeBSD.org  Thu Jan  5 05:35:57 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 76F4216A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Jan 2006 05:35:57 +0000 (GMT)
	(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 1E40743D46
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Jan 2006 05:35:57 +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 k055ZuUO012037
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 5 Jan 2006 05:35:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k055Zu5k012036;
	Thu, 5 Jan 2006 05:35:56 GMT
	(envelope-from nobody)
Message-Id: <200601050535.k055Zu5k012036@www.freebsd.org>
Date: Thu, 5 Jan 2006 05:35:56 GMT
From: Jeremy Ehrhardt <jeremye@caltech.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Linksys EG1032 V3.0 Gigabit card captured by sk(4), should be re(4)
X-Send-Pr-Version: www-2.3

>Number:         91332
>Category:       kern
>Synopsis:       [re] [patch] Linksys EG1032 V3.0 Gigabit card captured by sk(4), should be re(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 05 05:40:04 GMT 2006
>Closed-Date:    Fri Jun 15 11:40:14 GMT 2007
>Last-Modified:  Fri Jun 15 11:40:14 GMT 2007
>Originator:     Jeremy Ehrhardt
>Release:        6.0-RELEASE
>Organization:
Caltech
>Environment:
FreeBSD turbine.caltech.edu 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Wed Jan  4 17:53:35 PST 2006     root@turbine.caltech.edu:/usr/obj/usr/src/sys/SANDERS  i386
>Description:
The V1.0 and V2.0 versions of the Linksys EG1032 Gigabit Ethernet PCI
card are supported by the sk(4) driver. Linksys changed the chipset to
the RealTek RTL-8169S in the V3.0 version of the card, but did not change
the PCI device ID (0x1032). The card is captured by the sk(4) driver,
instead of the appropriate re(4) driver, and produces the following
errors in dmesg:

skc0: <Linksys EG1032 Gigabit Ethernet> port 0xe000-0xe0ff mem 0xdf002000-0xdf0020ff irq 10 at device 20.0 on pci0
sk0: couldn't map ports/memory
device_attach: skc0 attach returned 6

The following output from scanpci -v describes the V3.0 version of the card:

pci bus 0x0000 cardnum 0x14 function 0x00: vendor 0x1737 device 0x1032
 Linksys  Device unknown
 CardVendor 0x1737 card 0x0024 (Card unknown)
  STATUS    0x02b0  COMMAND 0x0007
  CLASS     0x02 0x00 0x00  REVISION 0x10
  BIST      0x00  HEADER 0x00  LATENCY 0x20  CACHE 0x08
  BASE0     0x0000e001  addr 0x0000e000  I/O
  BASE1     0xdf002000  addr 0xdf002000  MEM
  MAX_LAT   0x40  MIN_GNT 0x20  INT_PIN 0x01  INT_LINE 0x0a

>How-To-Repeat:
On FreeBSD 6.0-RELEASE:
install a Linksys EG1032 V3.0 Gigabit Ethernet PCI card. If the re(4)
driver is present, it will ignore the card. If the sk(4) driver i
present, it will attempt to drive the card, but fail.
>Fix:
I have created a patch for the re(4) driver to add support for this
card. However, if the sk(4) driver is loaded, it will still capture the
card and the card will not operate. I don't know how to correct this.
The workaround is to unload or remove the sk(4) driver.

patches as produced by diff -u:

patch for src/sys/dev/if_re.c:
--- if_re.c.original    Wed Jan  4 17:33:04 2006
+++ if_re.c     Wed Jan  4 17:32:42 2006
@@ -177,6 +177,8 @@
                "RealTek 8110S Single-chip Gigabit Ethernet" },
        { COREGA_VENDORID, COREGA_DEVICEID_CGLAPCIGT, RL_HWREV_8169S,
                "Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet" },
+       { LINKSYS_VENDORID, LINKSYS_DEVICEID_EG1032V30, RL_HWREV_8169S,
+               "Linksys EG1032 V3.0 (RTL8169S) Gigabit Ethernet" },
        { 0, 0, 0, NULL }
 };
 

patch for src/sys/pci/if_rlreg.h:
--- if_rlreg.h.original Wed Jan  4 17:33:25 2006
+++ if_rlreg.h  Wed Jan  4 17:30:40 2006
@@ -870,6 +870,16 @@
 #define EDIMAX_DEVICEID_EP4103DL               0xAB06
 
 /*
+ * Linksys vendor ID
+ */
+#define LINKSYS_VENDORID                       0x1737
+
+/*
+ * Linksys EG1032 V3.0 device ID
+ */
+#define LINKSYS_DEVICEID_EG1032V30             0x1032
+
+/*
  * PCI low memory base and low I/O base register, and
  * other PCI registers.
  */


>Release-Note:
>Audit-Trail:

From: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
To: bug-followup@FreeBSD.org, jeremye@caltech.edu
Cc:  
Subject: Re: kern/91332: [re] [patch] Linksys EG10320V3.0 Gigabit card
	captured by sk(4), should be re(4)
Date: Wed, 09 May 2007 14:50:46 +0100

 Hi,
 
 Can you test this again with FreeBSD 6.2 and confirm this has been
 fixed?  It should have been corrected with the following commits:
 http://docs.freebsd.org/cgi/mid.cgi?200510141851.j9EIpUDS077043
 http://docs.freebsd.org/cgi/mid.cgi?200511061600.jA6G0tXa095442
 
 It looks like it was fixed before 6.1 was released.
 
 Thanks,
 
 Gavin
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun May 13 04:32:59 UTC 2007 
State-Changed-Why:  
Note that submitter has been asked for feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91332 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Jun 15 11:39:48 UTC 2007 
State-Changed-Why:  
Feedback timeout, believed fixed. 

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