On Tue, Jan 22, 2013 at 02:46:48PM -0600, Paul Keusemann wrote:
> Hi,
> 
> I've got a Dell R200 which I'm trying to build into a gateway with a Sun 
> QGE (501-6738-10).  The cas driver fails to load the first time I try to 
> load it but succeeds the second time.  Is this a problem with the card, 
> the driver, my karma?

Wrong phase of the moon, apparently :)
The MII setup of these chips is a bit tricky and I'm not sure whether
I've hit all code paths during development of the driver. I certainly
didn't test with a 501-6738, these have been reported as working before,
though. It also doesn't make much sense that attaching the devices
succeeds on the second attempt. Could you please use a if_cas.ko built
with the attached patch and report the debug output for one of the
interfaces in both the working and the non-working case?

Marius

Index: if_cas.c
===================================================================
--- if_cas.c	(revision 245046)
+++ if_cas.c	(working copy)
@@ -332,6 +332,8 @@ cas_attach(struct cas_softc *sc)
 		 */
 		error = ENXIO;
 		v = CAS_READ_4(sc, CAS_MIF_CONF);
+device_printf(sc->sc_dev, "MIF=0x%x PCFG=0x%x\n", v,
+CAS_READ_4(sc, CAS_SATURN_PCFG));
 		if ((v & CAS_MIF_CONF_MDI1) != 0) {
 			v |= CAS_MIF_CONF_PHY_SELECT;
 			CAS_WRITE_4(sc, CAS_MIF_CONF, v);
@@ -347,6 +349,8 @@ cas_attach(struct cas_softc *sc)
 			error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp,
 			    cas_mediachange, cas_mediastatus, BMSR_DEFCAPMASK,
 			    MII_PHY_ANY, MII_OFFSET_ANY, MIIF_DOPAUSE);
+if (error == 0)
+device_printf(sc->sc_dev, "external PHY\n");
 		}
 		/*
 		 * Fall back on an internal PHY if no external PHY was found.
@@ -367,6 +371,8 @@ cas_attach(struct cas_softc *sc)
 			error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp,
 			    cas_mediachange, cas_mediastatus, BMSR_DEFCAPMASK,
 			    MII_PHY_ANY, MII_OFFSET_ANY, MIIF_DOPAUSE);
+if (error == 0)
+device_printf(sc->sc_dev, "internal PHY\n");
 		}
 	} else {
 		/*
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to