- Add workaround field in softc
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 19 Sep 2008 11:12:33 +0000 (11:12 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 19 Sep 2008 11:12:33 +0000 (11:12 +0000)
- Move "use extended fifo depth" from caps to workaround

sys/dev/netif/jme/if_jme.c
sys/dev/netif/jme/if_jmevar.h

index 5d28e1d..64dc816 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/jme/if_jme.c,v 1.2 2008/07/18 04:20:48 yongari Exp $
- * $DragonFly: src/sys/dev/netif/jme/if_jme.c,v 1.8 2008/09/17 08:51:29 sephe Exp $
+ * $DragonFly: src/sys/dev/netif/jme/if_jme.c,v 1.9 2008/09/19 11:12:33 sephe Exp $
  */
 
 #include <sys/param.h>
@@ -428,7 +428,7 @@ jme_probe(device_t dev)
                        sc->jme_caps = sp->jme_caps;
                        if (did == PCI_PRODUCT_JMICRON_JMC250 &&
                            pci_get_revid(dev) == JME_REV_JMC250_A2)
-                               sc->jme_caps |= JME_CAP_EXTFIFO;
+                               sc->jme_workaround |= JME_WA_EXTFIFO;
 
                        device_set_desc(dev, sp->jme_name);
                        return (0);
@@ -754,7 +754,7 @@ jme_attach(device_t dev)
                                jme_miibus_writereg(dev, sc->jme_phyaddr,
                                    JMPHY_CONF, JMPHY_CONF_DEFFIFO);
 
-                               /* XXX should we clear JME_CAP_EXTFIFO */
+                               /* XXX should we clear JME_WA_EXTFIFO */
                        }
                }
        }
@@ -1902,7 +1902,7 @@ jme_mac_config(struct jme_softc *sc)
        CSR_WRITE_4(sc, JME_TXMAC, txmac);
        CSR_WRITE_4(sc, JME_TXPFC, txpause);
 
-       if (sc->jme_caps & JME_CAP_EXTFIFO) {
+       if (sc->jme_workaround & JME_WA_EXTFIFO) {
                jme_miibus_writereg(sc->jme_dev, sc->jme_phyaddr,
                                    JMPHY_CONF, phyconf);
        }
index a5fd992..8493412 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/jme/if_jmevar.h,v 1.1 2008/05/27 01:42:01 yongari Exp $
- * $DragonFly: src/sys/dev/netif/jme/if_jmevar.h,v 1.4 2008/09/13 04:04:39 sephe Exp $
+ * $DragonFly: src/sys/dev/netif/jme/if_jmevar.h,v 1.5 2008/09/19 11:12:33 sephe Exp $
  */
 
 #ifndef        _IF_JMEVAR_H
@@ -188,7 +188,9 @@ struct jme_softc {
 #define        JME_CAP_PMCAP           0x0004
 #define        JME_CAP_FASTETH         0x0008
 #define        JME_CAP_JUMBO           0x0010
-#define JME_CAP_EXTFIFO                0x0020
+
+       uint32_t                jme_workaround;
+#define JME_WA_EXTFIFO         0x0001
 
        uint32_t                jme_flags;
 #define        JME_FLAG_MSI            0x0001