sis(4) flow control
Yonghyeon PYUN
pyunyh at gmail.com
Wed Jul 10 02:35:21 UTC 2013
On Tue, Jul 09, 2013 at 03:52:25PM +0200, Andreas Longwitz wrote:
> Some of my soekris boxes run with sis interfaces. Because I need
> ethernet flow control on these boxes I use the following patch (against
> 8-Stable) for some years:
>
> --- if_sis.c.orig 2013-05-15 20:01:16.000000000 +0200
> +++ if_sis.c 2013-06-24 15:58:05.000000000 +0200
> @@ -1965,6 +1965,18 @@
> }
> #endif
>
> + if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr >= NS_SRR_16A) {
> + if (ifp->if_flags & IFF_LINK0) {
> + /*
> + * Configure Ethernet flow control for outgoing frames.
> + * Enable reception of 802.3x multicast pause frames.
> + */
> + SIS_SETBIT(sc, NS_PCR, NS_PCR_PAUSE );
> + } else {
> + SIS_CLRBIT(sc, NS_PCR, NS_PCR_PAUSE );
> + }
> + }
> +
> mii = device_get_softc(sc->sis_miibus);
>
> /* Set MAC address */
>
> Other network drivers (eg. vr) have this functionality inside, it would
> be fine if sis learns flow control too.
>
Hmm, does the change really make flow-control work?
I believe flow-control should be negotiated with remote link
partner so you have to announce flow-control capability to link
partner. In addition, it seems DP83815/DP83816 does not support
TX flow-control so it just honors RX pause frames.
Try attached patch and let me know how it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sis.flow.diff
Type: text/x-diff
Size: 2338 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20130710/c9ba8662/attachment.diff>
More information about the freebsd-net
mailing list