svn commit: r200177 - in stable/7/sys/dev/cxgb: . common
Navdeep Parhar
np at FreeBSD.org
Sun Dec 6 02:44:56 UTC 2009
Author: np
Date: Sun Dec 6 02:44:55 2009
New Revision: 200177
URL: http://svn.freebsd.org/changeset/base/200177
Log:
MFC r199237, r199238
sc->rev and is_offload(sc) will always be 0 during probe. Wait till
attach to get correct values.
Make sure *some* edc is setup even for an unknown transceiver (assume
it is optical).
Modified:
stable/7/sys/dev/cxgb/common/cxgb_ael1002.c
stable/7/sys/dev/cxgb/cxgb_main.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c
==============================================================================
--- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Sun Dec 6 01:59:06 2009 (r200176)
+++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Sun Dec 6 02:44:55 2009 (r200177)
@@ -1250,7 +1250,7 @@ static int ael2005_reset(struct cphy *ph
return err;
phy->modtype = (u8)err;
- if (err == phy_modtype_none || err == phy_modtype_unknown)
+ if (err == phy_modtype_none)
err = 0;
else if (err == phy_modtype_twinax || err == phy_modtype_twinax_long)
err = ael2005_setup_twinax_edc(phy, err);
Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c Sun Dec 6 01:59:06 2009 (r200176)
+++ stable/7/sys/dev/cxgb/cxgb_main.c Sun Dec 6 02:44:55 2009 (r200177)
@@ -356,7 +356,6 @@ cxgb_controller_probe(device_t dev)
const struct adapter_info *ai;
char *ports, buf[80];
int nports;
- struct adapter *sc = device_get_softc(dev);
ai = cxgb_get_adapter_info(dev);
if (ai == NULL)
@@ -368,9 +367,7 @@ cxgb_controller_probe(device_t dev)
else
ports = "ports";
- snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s",
- ai->desc, is_offload(sc) ? "R" : "",
- sc->params.rev, nports, ports);
+ snprintf(buf, sizeof(buf), "%s, %d %s", ai->desc, nports, ports);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_DEFAULT);
}
@@ -663,8 +660,8 @@ cxgb_controller_attach(device_t dev)
G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers),
G_FW_VERSION_MICRO(vers));
- snprintf(buf, sizeof(buf), "%s\t E/C: %s S/N: %s",
- ai->desc,
+ snprintf(buf, sizeof(buf), "%s %sNIC\t E/C: %s S/N: %s",
+ ai->desc, is_offload(sc) ? "R" : "",
sc->params.vpd.ec, sc->params.vpd.sn);
device_set_desc_copy(dev, buf);
More information about the svn-src-stable
mailing list