9front - general discussion about 9front
 help / color / mirror / Atom feed
From: quux quux <qu7uux@gmail.com>
To: 9front@9front.org
Subject: ether8169.c: support for rtl8411b (rtl8168g family)
Date: Mon, 10 Nov 2014 11:39:22 +0100	[thread overview]
Message-ID: <CAAGZaiLZDHL2cD1_gHqrWEiCtfecot+76OGimB3CQ5PGen7HWQ@mail.gmail.com> (raw)
In-Reply-To: <CAAGZaiJybsEeJfTtsoq08oBdEu51QeYuVuMVrJ5ftMygk=0j9Q@mail.gmail.com>

Without the inlined patch:
term% grep rtl /dev/kmesg
rtl8169: unknown mac 8168 5c800000

I have no idea what the correct Macv?? is, 41 is arbitrary. Someone
who knows what they are doing may have to review this.

- based on the following changes in FreeBSD/OpenBSD:
http://svnweb.freebsd.org/base?view=revision&revision=257305
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/ic/re.c.diff?r1=1.144&r2=1.145&f=h
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/ic/rtl81x9reg.h.diff?r1=1.76&r2=1.77&f=h
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/ic/rtl81x9reg.h.diff?r1=1.83&r2=1.84&f=h
- sysinfo _with_ patch, on amd64 (please disregard non-working audio
and iwl stuff):
http://sysinfo.9front.org/src/86/body
- tested only on amd64; machine is an Acer V5-573G (exact model:
V5-573G-74518G1Takk)

diff -r 7c2d0e7d27a7 sys/src/9/pc/ether8169.c
--- a/sys/src/9/pc/ether8169.c	Sun Nov 09 13:41:06 2014 -0800
+++ b/sys/src/9/pc/ether8169.c	Mon Nov 10 00:00:35 2014 +0100
@@ -121,6 +121,7 @@
 	Macv29		= 0x40800000,	/* RTL8101/8102E */
 	Macv30		= 0x24000000,	/* RTL8101E? (untested) */
 	Macv40		= 0x4c000000,	/* RTL8168G */
+	Macv41		= 0x5c800000,	/* RTL8411B */
 	Ifg0		= 0x01000000,	/* Interframe Gap 0 */
 	Ifg1		= 0x02000000,	/* Interframe Gap 1 */
 };
@@ -702,6 +703,7 @@
 	cplusc |= Txenb|Mulrw;
 	switch(ctlr->macv){
 	case Macv40:
+	case Macv41:
 		cplusc |= Macstatdis;
 		break;
 	default:
@@ -1051,6 +1053,7 @@
 	case Macv29:
 	case Macv30:
 	case Macv40:
+	case Macv41:
 		break;
 	}
 	return 0;


       reply	other threads:[~2014-11-10 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAGZaiJybsEeJfTtsoq08oBdEu51QeYuVuMVrJ5ftMygk=0j9Q@mail.gmail.com>
2014-11-10 10:39 ` quux quux [this message]
2014-11-10 11:13   ` [9front] " cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAGZaiLZDHL2cD1_gHqrWEiCtfecot+76OGimB3CQ5PGen7HWQ@mail.gmail.com \
    --to=qu7uux@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).