Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 2010 06:28:22 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r204401 - user/jmallett/octeon/sys/mips/cavium/dev/rgmii
Message-ID:  <201002270628.o1R6SMVE078416@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Sat Feb 27 06:28:22 2010
New Revision: 204401
URL: http://svn.freebsd.org/changeset/base/204401

Log:
  o) Since typestr is always NULL don't bother printing it.
  o) Don't mask off the low byte of chipid -- some of the case statements are
     unreachable if you do that.  This fixes crashes on the CAM-0100 from trying
     to enumerate a 4th port that isn't there.

Modified:
  user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c

Modified: user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Sat Feb 27 05:55:04 2010	(r204400)
+++ user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Sat Feb 27 06:28:22 2010	(r204401)
@@ -136,7 +136,9 @@ struct rgmx_softc_dev {
 	u_int			idx;
         u_char                  ieee[6];
 
+#if 0
         char const * typestr;   /* printable name of the interface.  */
+#endif
         u_short txb_size;       /* size of TX buffer, in bytes  */
 
         /* Transmission buffer management.  */
@@ -350,7 +352,9 @@ static int octeon_rgmx_init_ifnet (struc
 
         ether_ifattach(sc->ifp, sc->ieee);
         /* Print additional info when attached.  */
+#if 0
         device_printf(sc->sc_dev, "type %s, full duplex\n", sc->typestr);
+#endif
 
         return (0);
 }
@@ -2181,7 +2185,7 @@ static int octeon_has_4ports (void)
     u_int chipid;
     int retcode = 1;
 
-    chipid = octeon_get_chipid() & 0xffffff00;
+    chipid = octeon_get_chipid();
 
     switch (chipid) {
         case OCTEON_CN31XX_CHIP:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002270628.o1R6SMVE078416>