Module Name:    src
Committed By:   cegger
Date:           Tue Aug  4 13:17:55 UTC 2009

Modified Files:
        src/sys/dev/pci: if_age.c

Log Message:
support flow control. from OpenBSD.
tested by hans@


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/if_age.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_age.c
diff -u src/sys/dev/pci/if_age.c:1.28 src/sys/dev/pci/if_age.c:1.29
--- src/sys/dev/pci/if_age.c:1.28	Tue Apr 28 11:47:56 2009
+++ src/sys/dev/pci/if_age.c	Tue Aug  4 13:17:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.28 2009/04/28 11:47:56 cegger Exp $ */
+/*	$NetBSD: if_age.c,v 1.29 2009/08/04 13:17:55 cegger Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.28 2009/04/28 11:47:56 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.29 2009/08/04 13:17:55 cegger Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -275,7 +275,7 @@
 	ifmedia_init(&sc->sc_miibus.mii_media, 0, age_mediachange,
 	    age_mediastatus);
 	mii_attach(self, &sc->sc_miibus, 0xffffffff, MII_PHY_ANY,
-	   MII_OFFSET_ANY, 0);
+	   MII_OFFSET_ANY, MIIF_DOPAUSE);
 
 	if (LIST_FIRST(&sc->sc_miibus.mii_phys) == NULL) {
 		aprint_error_dev(self, "no PHY found!\n");
@@ -1166,12 +1166,10 @@
 	}
 	if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) {
 		reg |= MAC_CFG_FULL_DUPLEX;
-#ifdef notyet
 		if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0)
 			reg |= MAC_CFG_TX_FC;
 		if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0)
 			reg |= MAC_CFG_RX_FC;
-#endif
 	}
 
 	CSR_WRITE_4(sc, AGE_MAC_CFG, reg);

Reply via email to