summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_rue.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2005-03-25 20:19:18 +0000
committersobomax <sobomax@FreeBSD.org>2005-03-25 20:19:18 +0000
commit012bf80ac957d25c2395d645ea284c8779ec8158 (patch)
treee5d580d02dfd28d1d0d007f4f41185c388fbd29c /sys/dev/usb/if_rue.c
parent3b88b0f403c14a37086d6bc0f64e2727d63455e0 (diff)
downloadFreeBSD-src-012bf80ac957d25c2395d645ea284c8779ec8158.zip
FreeBSD-src-012bf80ac957d25c2395d645ea284c8779ec8158.tar.gz
Comment out rue_miibus_statchg() function. Using trial-and-error approach I
found it guilty in putting the card into unusable state after UP->DOWN->UP media status change. Looks like some of register writes in this functions mess up PHY interface. No visible regressions has been found after commenting this code out - the card properly handles forceful local mode changes and auto-detects changes made remotely (tested with Auto, 10HD, 10FD, 100HD, 100FD). Sponsored by: PBXpress Inc. MFC after: 3 days
Diffstat (limited to 'sys/dev/usb/if_rue.c')
-rw-r--r--sys/dev/usb/if_rue.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/usb/if_rue.c b/sys/dev/usb/if_rue.c
index 3b8b778..d5d3a89 100644
--- a/sys/dev/usb/if_rue.c
+++ b/sys/dev/usb/if_rue.c
@@ -432,6 +432,17 @@ rue_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
Static void
rue_miibus_statchg(device_ptr_t dev)
{
+ /*
+ * When the code below is enabled the card starts doing weird
+ * things after link going from UP to DOWN and back UP.
+ *
+ * Looks like some of register writes below messes up PHY
+ * interface.
+ *
+ * No visible regressions were found after commenting this code
+ * out, so that disable it for good.
+ */
+#if 0
struct rue_softc *sc = USBGETSOFTC(dev);
struct mii_data *mii = GET_MII(sc);
int bmcr;
@@ -453,6 +464,7 @@ rue_miibus_statchg(device_ptr_t dev)
rue_csr_write_2(sc, RUE_BMCR, bmcr);
RUE_SETBIT(sc, RUE_CR, (RUE_CR_RE | RUE_CR_TE));
+#endif
}
/*
OpenPOWER on IntegriCloud