Subject: kern/32009: Use of pause frames are not properly auto-negotiated with wm driver
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <tkuik@cisco.com>
List: netbsd-bugs
Date: 11/07/2005 18:00:01
>Number:         32009
>Category:       kern
>Synopsis:       Use of pause frames are not properly auto-negotiated with wm driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 07 18:00:00 +0000 2005
>Originator:     Tim Kuik
>Release:        NetBSD-current
>Organization:
Cisco
>Environment:
NetBSD netbsd 3.99.8 NetBSD 3.99.8 ... i386

>Description:
The pause frame selection bits, being set in the transmit configuration word, are reserved (bits 10 & 11).  The proper bits are 7 & 8 for pause frame selection.
>How-To-Repeat:
Pause frame use is never autonegotiated properly.
>Fix:
I added two new defines for the TXCW register (0x178):
diff <NetBSD-current> if_wmreg.h
461a462,463
> #define TXCW_ANE_SYM_PAUSE (1U << 7)
> #define TXCW_ANE_ASYM_PAUSE (1U << 8)

Change the source to use the correct definitions:
diff <NetBSD-current> if_wm.c
3411c3411
<               sc->sc_txcw |= ANAR_X_PAUSE_SYM | ANAR_X_PAUSE_ASYM;
---
>               sc->sc_txcw |= TXCW_ANE_SYM_PAUSE | TXCW_ANE_ASYM_PAUSE;