Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

age(4), ale(4) users: call for testing



Hi!

All users of age(4) and/or ale(4) network:

Attached patch adds support for flow control.

Please report back, if it fixes or raises any
problems.

Christoph
Index: if_age.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_age.c,v
retrieving revision 1.28
diff -u -p -r1.28 if_age.c
--- if_age.c    28 Apr 2009 11:47:56 -0000      1.28
+++ if_age.c    28 Jul 2009 06:11:11 -0000
@@ -275,7 +275,7 @@ age_attach(device_t parent, device_t sel
        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 @@ age_mac_config(struct age_softc *sc)
        }
        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);
Index: if_ale.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ale.c,v
retrieving revision 1.4
diff -u -p -r1.4 if_ale.c
--- if_ale.c    28 Jul 2009 06:02:34 -0000      1.4
+++ if_ale.c    28 Jul 2009 06:11:11 -0000
@@ -370,7 +370,7 @@ ale_attach(device_t parent, device_t sel
        const char *intrstr;
        struct ifnet *ifp;
        pcireg_t memtype;
-       int error = 0;
+       int mii_flags, error = 0;
        uint32_t rxf_len, txf_len;
        const char *chipname;
 
@@ -542,8 +542,11 @@ ale_attach(device_t parent, device_t sel
        sc->sc_ec.ec_mii = &sc->sc_miibus;
        ifmedia_init(&sc->sc_miibus.mii_media, 0, ale_mediachange,
            ale_mediastatus);
+       mii_flags = 0;
+       if ((sc->ale_flags & ALE_FLAG_JUMBO) != 0)
+               mii_flags |= MIIF_DOPAUSE;
        mii_attach(self, &sc->sc_miibus, 0xffffffff, MII_PHY_ANY,
-           MII_OFFSET_ANY, 0);
+           MII_OFFSET_ANY, mii_flags);
 
        if (LIST_FIRST(&sc->sc_miibus.mii_phys) == NULL) {
                aprint_error_dev(self, "no PHY found!\n");
@@ -1155,12 +1158,10 @@ ale_mac_config(struct ale_softc *sc)
        }
        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, ALE_MAC_CFG, reg);
 }


Home | Main Index | Thread Index | Old Index