Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2012 08:58:03 -0600
From:      "Matt Renzelmann" <mjr@cs.wisc.edu>
To:        <pyunyh@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   RE: 8139 driver question
Message-ID:  <003b01cceb29$116722a0$343567e0$@cs.wisc.edu>
In-Reply-To: <20120215024445.GA1340@michelle.cdnetworks.com>
References:  <003101cce1b8$fe7def80$fb79ce80$@cs.wisc.edu> <20120215024445.GA1340@michelle.cdnetworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
You're welcome.  For what it's worth, the Linux driver uses the second set of
values referenced below.  I think one of the two drivers likely has a bug, but
I'm not currently in a position to test it on hardware, so you don't need to fix
it on my account :)

Thanks and regards,
Matt

-----Original Message-----
From: YongHyeon PYUN [mailto:pyunyh@gmail.com] 
Sent: Tuesday, February 14, 2012 8:45 PM
To: Matt Renzelmann
Cc: freebsd-net@freebsd.org
Subject: Re: 8139 driver question

On Thu, Feb 02, 2012 at 08:43:09AM -0600, Matt Renzelmann wrote:
> Hello,
> 
> This will seem a bit off the wall, but I just noticed a discrepancy between
the
> registers defined in the pci/if_rlreg.h directory and those specified on the
> RealTek datasheets for the antique RealTek 8139.
> 
> In particular, as defined in the header, the registers in question are:
> #define RL_CFG0     0x0051      /* config register #0 */
> #define RL_CFG1     0x0052      /* config register #1 */
> #define RL_CFG2     0x0053      /* config register #2 */
> #define RL_CFG3     0x0054      /* config register #3 */
> #define RL_CFG4     0x0055      /* config register #4 */
> #define RL_CFG5     0x0056      /* config register #5 */
> 
> The RealTek data sheets for the 8139, however, all indicate that these should
be
> set to something like this:
> #define RL_CFG0     0x0051      /* config register #0 */
> #define RL_CFG1     0x0052      /* config register #1 */
> // No Config2
> #define RL_CFG3     0x0059      /* config register #3 */
> #define RL_CFG4     0x005A      /* config register #4 */
> #define RL_CFG5     0x00D8      /* config register #5 */
> 
> The datasheets I'm referencing are available here:
> http://realtek.info/pdf/
> 
> Specifically:
> http://realtek.info/pdf/rtl8139d.pdf
> http://realtek.info/pdf/rtl8139cp.pdf
> 
> I believe the registers currently used apply to the 8169, but not necessarily
> the 8139 family -- can someone, hopefully easily, verify that the 8139 driver
is
> using the right registers?  The 8139 series may need the slightly different
> values used above to enable functionality like wake-on-lan.
> 

Thanks for letting me know that.  As you said RTL8139/RTL8139C+
use different config registers and it may affect WOL functionality.
When I implemented WOL on rl(4), I remember WOL worked at that
time. After reading your mail,  I wonder how it would have worked
at that time. :-(

Thanks.

> Thanks and regards,
> Matt




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003b01cceb29$116722a0$343567e0$>