Bug 5108 - Enhancement Request: r8169 Driver update to support Linksys EG1032 v3 Instant Gigabit Network Adaptor
Summary: Enhancement Request: r8169 Driver update to support Linksys EG1032 v3 Instant...
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-21 20:32 UTC by Christiaan Lutzer
Modified: 2005-09-18 16:15 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.12.5
Tree: Mainline
Regression: ---


Attachments
Updated version of the Linksys EG1032 PCI ID patch (834 bytes, patch)
2005-08-22 15:32 UTC, Francois Romieu
Details | Diff

Description Christiaan Lutzer 2005-08-21 20:32:21 UTC
Distribution: Fedora Core 3
Hardware Environment: Soyo KT600/AMD Sempron 1800
Software Environment: Er, Fedora Core 3
Problem Description: The Linksys EG1032 v3 Instant Gigabit Network Adaptor was
incorrectly identified as a sk98lin device.  The card uses a Realtek chipset:
RTL8169S-32.  So, obviously the sk98lin driver didn't work.  What's more, the
r8169 driver did not work either.  I grabbed the kernel sources for 2.6.12.5 and
added one line to r8169.c.  I changed:

static struct pci_device_id rtl8169_pci_tbl[] = {
	{0x10ec, 0x8169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{0x1186, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{0,},
};

To:

static struct pci_device_id rtl8169_pci_tbl[] = {
	{0x10ec, 0x8169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{0x1186, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{0x1737, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, 0},
	{0,},
};

Now, I did my testing against the 2.6.12-1.1372_FC3 Kernel (because I'm running
FC3).  However, I noticed the rtl8169_pci_tbl in that kernel, and 2.6.12.5 are
the same, so the patch *should* apply (no pun intended).  I created a ``diff
-u'' patch for linux-2.6.12.5/drivers/net/r8169.c:

--- r8169.c     2005-08-21 22:04:51.000000000 -0400
+++ r8169_fixed.c       2005-08-21 22:02:05.000000000 -0400
@@ -176,6 +176,7 @@
 static struct pci_device_id rtl8169_pci_tbl[] = {
        {0x10ec, 0x8169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0x1186, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {0x1737, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, 0},
        {0,},
 };

NB: You'll notice that the subdevice field is not PCI_ANY_ID.  This is critical
since the EG1032v2 cards don't use the Realtek chipset--they use the Syskonnect
chipset, and hence the sk98lin driver.  I took a look at that driver while
writing this bug report, and most likely, (the royal) we'll have to change it to
not apply to all Linksys Gigabit Adaptors:

(skge.c)
static struct pci_device_id skge_pci_tbl[] = {
        { PCI_VENDOR_ID_3COM, 0x1700, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_SYSKONNECT, 0x4300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_SYSKONNECT, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_DLINK, 0x4c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_MARVELL, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
#if 0   /* don't handle Yukon2 cards at the moment -- mlindner@syskonnect.de */
        { PCI_VENDOR_ID_MARVELL, 0x4360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_MARVELL, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
#endif
        { PCI_VENDOR_ID_MARVELL, 0x5005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_CNET, 0x434e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_LINKSYS, 0x1064, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0, }
};

You'll notice the line, { PCI_VENDOR_ID_LINKSYS, 0x1032 } will screw up the v3
cards.  I had to physically remove my sk98lin driver from my system to get the
card to work.  From what I can tell, we can change the PCI_ANY_ID for the 1032
in this case (I'm not sure about the 64 case) to 0x0015:

http://pci-ids.ucw.cz/iii/iii.php?i=17371032

Then, the sk98lin driver will only support the v2 card, the r8169 driver will
support the v3 card.

Wow, this is long winded, I hope this is an appropriate bug report.  Please let
me know if you need anything else from me.

Christiaan Lutzer <mythtv.lutzer@gmail.com>

Steps to reproduce:
Comment 1 Francois Romieu 2005-08-22 15:32:37 UTC
Created attachment 5733 [details]
Updated version of the Linksys EG1032 PCI ID patch
Comment 2 Francois Romieu 2005-08-22 15:46:00 UTC
Added Stephen to the Cc: list as it may be relevnt for the skge maintainer.

Bob, can you give the patch a try against 2.6.13-rc6 ?

Christiaan, can you send me offline a few more details regarding the limitation
of the transfer rate at 66 Mo/s ?

--
Ueimor
Comment 3 Francois Romieu 2005-09-10 06:40:09 UTC
The relevant changes for the skge driver and the r8169 are in -linus tree.

Is everybody happy with it ?

--
Ueimor
Comment 4 Christiaan Lutzer 2005-09-17 22:16:23 UTC
The changes look good to me (both the 8169 and the sk98lin sources have been 
updated). I'm new to kernel releases etc., but it looks like the fix will be 
in a 2.6.14 kernel?

Christiaan

On 9/10/05, bugme-daemon@kernel-bugs.osdl.org <
bugme-daemon@kernel-bugs.osdl.org> wrote:
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=5108
> 
> 
> 
> 
> 
> ------- Additional Comments From romieu@fr.zoreil.com 2005-09-10 06:40 
> -------
> The relevant changes for the skge driver and the r8169 are in -linus tree.
> 
> Is everybody happy with it ?
> 
> --
> Ueimor
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> You are on the CC list for the bug, or are watching someone who is.
> 



The changes look good to me (both the 8169 and the sk98lin sources have
been updated).&nbsp; I'm new to kernel releases etc., but it looks like
the fix will be in a 2.6.14 kernel?<br>
<br>
Christiaan<br><br><div><span class="gmail_quote">On 9/10/05, <b class="gmail_sendername"><a href="mailto:bugme-daemon@kernel-bugs.osdl.org">bugme-daemon@kernel-bugs.osdl.org</a></b> &lt;<a href="mailto:bugme-daemon@kernel-bugs.osdl.org">
bugme-daemon@kernel-bugs.osdl.org</a>&gt; wrote:</span><blockquote class="gmail_quote" DEFANGED_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><a href="http://bugzilla.kernel.org/show_bug.cgi?id=5108">
http://bugzilla.kernel.org/show_bug.cgi?id=5108</a><br><br><br><br><br><br>------- Additional Comments From <a href="mailto:romieu@fr.zoreil.com">romieu@fr.zoreil.com</a>&nbsp;&nbsp;2005-09-10 06:40 -------<br>The relevant changes for the skge driver and the r8169 are in -linus tree.
<br><br>Is everybody happy with it ?<br><br>--<br>Ueimor<br><br>------- You are receiving this mail because: -------<br>You reported the bug, or are watching the reporter.<br>You are on the CC list for the bug, or are watching someone who is.
<br></blockquote></div><br><br clear="all"><br>-- <br>Christiaan Lutzer<br>HD-3000 | DVB/QAM Cable | Comcast Digital Cable, 02139 U.S.<br>PVR-250 | Analog Cable | Comcast Cable, 02139 U.S.<br><a href="http://mandalore.dyndns.biz/">
http://mandalore.dyndns.biz/</a><br><a href="http://mandalore.dyndns.biz/~clutzer/">http://mandalore.dyndns.biz/~clutzer/</a>
Comment 5 Francois Romieu 2005-09-18 16:15:02 UTC
The fix will be in 2.6.14. Actually it is already in 2.6.14-rc1.

Thanks everyone.

--
Ueimor

Note You need to log in before you can comment on or make changes to this bug.