shithub: riscv

Download patch

ref: acfd092987498fec4391093134df66883608610f
parent: 1e821d82f2d1a2e08e0094b76c91c0de80b0b973
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 7 17:24:13 EDT 2016

ether82563: initial i217 support from http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff (thanks k0ga)

This patch is only an adaptation for 9front of the patch located in
http://www.9legacy.org/9legacy/patch/pc-ether82563-i210.diff.  The
major difference is that this patch ignores errors in checksum of
eeprom, because in my system the checksum was wrong.  After 3 months,
I didn't have problems, and I think the patch can be used.  although
it has some things that need to be fixed.  If the link is inactive
when the system boots then it will remain inactive forever.

--- a/sys/src/9/pc/ether82563.c
+++ b/sys/src/9/pc/ether82563.c
@@ -444,6 +444,7 @@
 	i82580,
 	i82583,
 	i210,
+	i217,
 	i218,
 	i350,
 	Nctlrtype,
@@ -486,6 +487,7 @@
 [i82580]	"i82580",	9728,	F75|F79phy,
 [i82583]	"i82583",	1514,	0,
 [i210]		"i210",		9728,	F75|Fnofct|Fert,
+[i217]		"i217",		9728,	Fload|Fnofct|Fert|Fbadcsum,
 [i218]		"i218",		9728,	Fload|Fert|F79phy|Fnofct|Fbadcsum,
 [i350]		"i350",		9728,	F75|F79phy|Fnofct,
 };
@@ -759,6 +761,7 @@
 	case i82577m:
 	case i82579:
 	case i210:
+	case i217:
 	case i218:
 		bit = (addr[5]<<2)|(addr[4]>>6);
 		x = (bit>>5) & 31;
@@ -1863,6 +1866,10 @@
 		return i82583;
 	case 0x1533:		/* copper */
 		return i210;
+	case 0x153a:		/* i217-lm */
+	case 0x153b:		/* i217-v */
+		return i217;
+		break;
 	case 0x1559:		/* i218-v */
 	case 0x155a:		/* i218-lm */
 	case 0x15a0:		/* i218-lm */
@@ -2090,6 +2097,12 @@
 }
 
 static int
+i217pnp(Ether *e)
+{
+	return pnp(e, i217);
+}
+
+static int
 i218pnp(Ether *e)
 {
 	return pnp(e, i218);
@@ -2125,6 +2138,7 @@
 	addethercard("i82580", i82580pnp);
 	addethercard("i82583", i82583pnp);
 	addethercard("i210", i210pnp);
+	addethercard("i217", i217pnp);
 	addethercard("i218", i218pnp);
 	addethercard("i350", i350pnp);
 	addethercard("igbepcie", anypnp);