Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2013 15:47:30 +0900
From:      Yonghyeon PYUN <pyunyh@gmail.com>
To:        Andreas Longwitz <longwitz@incore.de>
Cc:        freebsd-net@freebsd.org
Subject:   Re: sis(4) flow control
Message-ID:  <20130715064730.GA1088@michelle.cdnetworks.com>
In-Reply-To: <51E30186.9050707@incore.de>
References:  <51DC1599.8040805@incore.de> <20130710023512.GB2753@michelle.cdnetworks.com> <51DDDDAB.6070100@incore.de> <20130711002557.GA6697@michelle.cdnetworks.com> <51E1B8F0.5030100@incore.de> <20130714100347.GA1105@michelle.cdnetworks.com> <51E30186.9050707@incore.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 14, 2013 at 09:52:38PM +0200, Andreas Longwitz wrote:
> Yonghyeon PYUN wrote:
> 
> >> Maybe there is a bug in vr(4) that generates the hang, but why is
> > 
> > Probably yes and I shall have to narrow down the issue.
> 
> One more hint: No hang - but of course no TX support - anymore, when I use
> 
> --- if_vr.c.orig        2013-06-25 09:58:29.000000000 +0200
> +++ if_vr.c     2013-07-14 18:09:12.000000000 +0200
> @@ -351,7 +351,6 @@
>                                 fc |= VR_FLOWCR1_RXPAUSE;
>                         if ((IFM_OPTIONS(mii->mii_media_active) &
>                             IFM_ETH_TXPAUSE) != 0) {
> -                               fc |= VR_FLOWCR1_TXPAUSE;
>                                 sc->vr_flags |= VR_F_TXPAUSE;
>                         }
>                         CSR_WRITE_1(sc, VR_FLOWCR1, fc);
> 
> Probably the RX pause frames will work with this patch.

Yes but it also disables generating TX pause frames. The controller
is not smart enough to know how many number of RX buffers are
available so driver has to explicitly tell the amount of free RX
buffers. It seems the logic has a bug.

> 
> >> negotiation of flowcontrol on vr(4) not done at boot time as shown for
> >> msk(4) ?
> >>
> > 
> > msk(4) supported flow-control from day 1 with a hack and it was
> > re-implemented later with proper way such that it always announces
> > flow-control. However for other drivers(i.e vr(4)) that didn't
> > support the feature in the beginning, you have to explicitly enable
> > the feature. The decision was made to provide compatibility and to
> > not introduce POLA.
> 
> Thanks for clarification, I see the flag MIIF_FORCEPAUSE does the job.
> 
> >> If you need more information about the hang let me know.
> > 
> > I guess it would be good idea to use a link partner that shows
> > hardware MAC statistics. If your switch provides such information
> > that's fine. If you use direct connection between two hosts without
> > switch, use other network drivers(most gigabit controllers support
> > hardware MAC counters).
> 
> I can easy realize to use my laptop with msk(4) as a link partner for my
> soekris box with vr(4).
> 
> -- 
> Dr. Andreas Longwitz
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130715064730.GA1088>