Date: Tue, 29 Oct 2013 09:56:07 +0100 From: Thomas Guldener <tguldener@bluewin.ch> To: pyunyh@gmail.com Cc: freebsd-current@freebsd.org Subject: Re: Shuttle DS47 - Realtek RT 8111G Message-ID: <00FE0273-87E2-4812-8145-F98A31D5AE0B@bluewin.ch> In-Reply-To: <20131029061417.GB1390@michelle.cdnetworks.com> References: <2F1C253C-BA52-4B5F-8DA9-0C15D46054A4@bluewin.ch> <206B1EDA-567F-4E58-AB71-AB91C4B8484B@samsco.org> <20130916021738.GA3619@michelle.cdnetworks.com> <4EA55409-2597-4931-B6B3-BF9DD11CD2EF@samsco.org> <20131029061417.GB1390@michelle.cdnetworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Great news - thx for the work
g.
thomas
On 29 Oct 2013, at 07:14, Yonghyeon PYUN <pyunyh@gmail.com> wrote:
> On Sun, Sep 15, 2013 at 09:04:28PM -0600, Scott Long wrote:
>>=20
>> On Sep 15, 2013, at 8:17 PM, Yonghyeon PYUN <pyunyh@gmail.com> wrote:
>>=20
>>> On Sat, Sep 14, 2013 at 08:47:06PM -0600, Scott Long wrote:
>>>> Index: sys/dev/re/if_re.c
>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>> --- sys/dev/re/if_re.c (revision 255582)
>>>> +++ sys/dev/re/if_re.c (working copy)
>>>> @@ -234,6 +234,10 @@
>>>> { RL_HWREV_8168E_VL, RL_8169, "8168E/8111E-VL", =
RL_JUMBO_MTU_6K},
>>>> { RL_HWREV_8168F, RL_8169, "8168F/8111F", RL_JUMBO_MTU_9K},
>>>> { RL_HWREV_8411, RL_8169, "8411", RL_JUMBO_MTU_9K},
>>>> + { RL_HWREV_8168_0, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K},
>>>> + { RL_HWREV_8168_1, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K},
>>>> + { RL_HWREV_8168_2, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K},
>>>> + { RL_HWREV_8168_4, RL_8169, "8411", RL_JUMBO_MTU_9K},
>>>> { 0, 0, NULL, 0 }
>>>> };
>>>>=20
>>>> @@ -1457,6 +1461,10 @@
>>>> case RL_HWREV_8168E_VL:
>>>> case RL_HWREV_8168F:
>>>> case RL_HWREV_8411:
>>>> + case RL_HWREV_8168G_0:
>>>> + case RL_HWREV_8168G_1:
>>>> + case RL_HWREV_8168G_2:
>>>> + case RL_HWREV_8168G_4:
>>>> sc->rl_flags |=3D RL_FLAG_PHYWAKE | RL_FLAG_PAR |
>>>> RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP |
>>>> RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 |
>>>> Index: sys/pci/if_rlreg.h
>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>> --- sys/pci/if_rlreg.h (revision 255582)
>>>> +++ sys/pci/if_rlreg.h (working copy)
>>>> @@ -191,6 +191,10 @@
>>>> #define RL_HWREV_8402 0x44000000
>>>> #define RL_HWREV_8168F 0x48000000
>>>> #define RL_HWREV_8411 0x48800000
>>>> +#define RL_HWREV_8168G_0 0x4c000000
>>>> +#define RL_HWREV_8168G_1 0x4c100000
>>>=20
>>> I don't know exact model number for these MACs but it may be 8168G.
>>>=20
>>>> +#define RL_HWREV_8168G_2 0x50900000
>>>=20
>>> This looks like 8168GU.
>>>=20
>>>> +#define RL_HWREV_8168G_4 0x5c800000
>>>=20
>>> This looks like 8411B.
>>>=20
>>> RL_TXCFG_HWREV is 0x7CC00000 so driver will not see
>>> RL_HWREV_8168G_1(0x4c100000) and RL_HWREV_8168G_2(0x50900000).
>>>=20
>>> It seems newer RealTek controllers seem to use ODP to access PHY.
>>> In addition, these controllers may need to set RX DMA parameter
>>> (bit 11 of RL_RXCFG). I'm not sure what this bit does though.
>>>=20
>>> Scott, did you test your patch on real H/W? If it works I'm fine
>>> with your patch. Just remove RL_HWREV_8168G_1 and RL_HWREV_8168G_2
>>> as current driver has no way to get these revisions.
>>=20
>> I tested the 0x4c00000 on real hardware. an MSI Z87I motherboard. =
The rest came from looking at the linux driver. That driver is =
structured very differently (and better, IMHO) than the FreeBSD one, so =
there's a lot that wasn't obvious to me. I'd be very happy to work more =
on this with your guidance.
>>=20
>=20
> FYI: Fixed in r257304-257306.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00FE0273-87E2-4812-8145-F98A31D5AE0B>
