svn commit: r189726 - head/sys/dev/ed

Warner Losh imp at FreeBSD.org
Wed Mar 11 23:35:01 PDT 2009


Author: imp
Date: Thu Mar 12 06:35:00 2009
New Revision: 189726
URL: http://svn.freebsd.org/changeset/base/189726

Log:
  o writereg needs to return a vlue.
  o Add TJ PTJ-LAN_T card.  Some more work may be needed to make this
    actually function correctly.

Modified:
  head/sys/dev/ed/if_ed_pccard.c

Modified: head/sys/dev/ed/if_ed_pccard.c
==============================================================================
--- head/sys/dev/ed/if_ed_pccard.c	Thu Mar 12 06:32:30 2009	(r189725)
+++ head/sys/dev/ed/if_ed_pccard.c	Thu Mar 12 06:35:00 2009	(r189726)
@@ -222,6 +222,7 @@ static const struct ed_product {
 	{ PCMCIA_CARD(TDK, DFL5610WS), 0},
 	{ PCMCIA_CARD(TELECOMDEVICE, LM5LT), 0 },
 	{ PCMCIA_CARD(TELECOMDEVICE, TCD_HPC100), NE2000DVF_AX88X90},
+	{ PCMCIA_CARD(TJ, PTJ_LAN_T), 0 },
 	{ PCMCIA_CARD(ZONET, ZEN), 0},
 	{ { NULL } }
 };
@@ -1017,7 +1018,7 @@ ed_miibus_readreg(device_t dev, int phy,
 	return (failed ? 0 : val);
 }
 
-static void
+static int
 ed_miibus_writereg(device_t dev, int phy, int reg, int data)
 {
 	struct ed_softc *sc;
@@ -1028,7 +1029,7 @@ ed_miibus_writereg(device_t dev, int phy
 	 * 0x11 through 0x1f.
 	 */
 	if (phy >= 0x11)
-		return;
+		return (0);
 
 	sc = device_get_softc(dev);
 	(*sc->mii_writebits)(sc, 0xffffffff, 32);
@@ -1039,6 +1040,7 @@ ed_miibus_writereg(device_t dev, int phy
 	(*sc->mii_writebits)(sc, ED_MII_TURNAROUND, ED_MII_TURNAROUND_BITS);
 	(*sc->mii_writebits)(sc, data, ED_MII_DATA_BITS);
 	(*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS);
+	return (0);
 }
 
 static int


More information about the svn-src-all mailing list