ifconfig on re0 panics Toshiba Satellite M115-S3094 with RealTek 8101E chipset

Sepherosa Ziehau sepherosa at gmail.com
Tue Dec 19 04:23:32 PST 2006


On 12/19/06, Joe Talbott <josepht at cstone.net> wrote:
On Sat, Dec 16, 2006 at 10:01:36AM +0800, Sepherosa Ziehau wrote:
> On 12/16/06, Joe Talbott <josepht at cstone.net> wrote:
> >Same again.  {vmcore,kernel}.10 are here:
> >
> >leaf.dragonflybsd.org:/home/josepht/crash/
>
> Same location, just as previous panics.
>
> >
> >I've put some if_printf's in the re_init function to try to narrow it
> >down but haven't managed to figure anything out yet.
>
> System paniced when we wrote to RE_TXCFG, with (RE_TXCFG_IDG |
> RE_TXCFG_MAXDMA).  The register and the value are both valid for
> RTL8101E.  So something wrong must happened, in either:
> 1) re_stop()
> 2) IDR config
> Rest of the things before setting RE_TXCFG is all valid for RTL8101E
>
> So I commented out IDR config in re_init() and added re_reset().  IDRs
> will be autoloaded, if card is initially powered on, and the value in
> IDRs can survive the reset command.  So let's just see whether it
> still panics:
> http://leaf.dragonflybsd.org/~sephe/re4.diff
I spent some time this weekend sprinkling if_printf's throughout
re_init() and this is the line where I am having trouble:
        CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB|RE_CMD_RX_ENB);

By using your re2.diff and moving this line near the end of re_init()
I am able to get the interface up and functioning with out panics.  I
don't have any documentation than the datasheet publicly available
from Realtek's web page so I'm not sure why this works or if it will
work for the other chips supported by the re(4) driver.  I have a
patch here:
http://leaf.dragonflybsd.org/~josepht/re.diff
Matt's point should be correct here, RTL8101E may access descriptor
rings immediately after TX/RX are enabled.  In the current re(4), the
descriptor rings' addresses are set after TX/RX are enabled.  I tested
your patch on my 8169S, though it works, TX performance is only ~1/2
as before, so please test this one:
http://leaf.dragonflybsd.org/~sephe/re5.diff
If it still panics as before, please try moving TX/RX enabling line
after line 2188
but before
if (sc->re_testmode) {
   return;
}
code block.
I noticed in the FreeBSD 4.7 driver that Realtek has on their web page
that they enable TX and RX much later in re_init() for the 8101E chips
though I had to wait even longer than they did to get a functioning
interface.
I tried moving the offending line to the end of re_init() in an
unpatched version of if_re.c and it no longer paniced but I couldn't
ping with the interface.
Without the patch, the alignment problem still plagues ;-)

I'm more than happy to help with further testing and debugging.
Thank you for your help :-D

Best Regards,
sephe
--
Live Free or Die




More information about the Kernel mailing list