svn commit: r207112 - user/jmallett/octeon/sys/mips/cavium/octe

Juli Mallett jmallett at FreeBSD.org
Fri Apr 23 10:33:33 UTC 2010


Author: jmallett
Date: Fri Apr 23 10:33:32 2010
New Revision: 207112
URL: http://svn.freebsd.org/changeset/base/207112

Log:
  o) Style cleanups.
  o) Set INTR_MPSAFE.
  o) Set a few interface flags and note interface fields that are not yet set.

Modified:
  user/jmallett/octeon/sys/mips/cavium/octe/ethernet-common.c
  user/jmallett/octeon/sys/mips/cavium/octe/ethernet-rgmii.c
  user/jmallett/octeon/sys/mips/cavium/octe/ethernet-spi.c
  user/jmallett/octeon/sys/mips/cavium/octe/ethernet.c

Modified: user/jmallett/octeon/sys/mips/cavium/octe/ethernet-common.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/octe/ethernet-common.c	Fri Apr 23 10:27:48 2010	(r207111)
+++ user/jmallett/octeon/sys/mips/cavium/octe/ethernet-common.c	Fri Apr 23 10:33:32 2010	(r207112)
@@ -261,6 +261,15 @@ int cvm_oct_common_init(struct ifnet *if
 #endif
 	count++;
 
+	/*
+	 * XXX
+	 * Need to set:
+	 * 	if_init
+	 * 	if_ioctl
+	 * 	if_start
+	 */
+	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+
 #if 0
 	ifp->get_stats          = cvm_oct_common_get_stats;
 	ifp->set_mac_address    = cvm_oct_common_set_mac_address;

Modified: user/jmallett/octeon/sys/mips/cavium/octe/ethernet-rgmii.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/octe/ethernet-rgmii.c	Fri Apr 23 10:27:48 2010	(r207111)
+++ user/jmallett/octeon/sys/mips/cavium/octe/ethernet-rgmii.c	Fri Apr 23 10:33:32 2010	(r207112)
@@ -279,15 +279,17 @@ int cvm_oct_rgmii_init(struct ifnet *ifp
 		sc = device_get_softc(device_get_parent(priv->dev));
 
 		rid = 0;
-		sc->sc_rgmii_irq = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ, &rid,
-						      CVMX_IRQ_RML, CVMX_IRQ_RML,
-						      1, RF_ACTIVE);
+		sc->sc_rgmii_irq = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ,
+						      &rid, CVMX_IRQ_RML,
+						      CVMX_IRQ_RML, 1,
+						      RF_ACTIVE);
 		if (sc->sc_rgmii_irq == NULL) {
 			device_printf(sc->sc_dev, "could not allocate RGMII irq");
 			return ENXIO;
 		}
 
-		error = bus_setup_intr(sc->sc_dev, sc->sc_rgmii_irq, INTR_TYPE_NET,
+		error = bus_setup_intr(sc->sc_dev, sc->sc_rgmii_irq,
+				       INTR_TYPE_NET | INTR_MPSAFE,
 				       cvm_oct_rgmii_rml_interrupt, NULL,
 				       &number_rgmii_ports, NULL);
 		if (error != 0) {

Modified: user/jmallett/octeon/sys/mips/cavium/octe/ethernet-spi.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/octe/ethernet-spi.c	Fri Apr 23 10:27:48 2010	(r207111)
+++ user/jmallett/octeon/sys/mips/cavium/octe/ethernet-spi.c	Fri Apr 23 10:33:32 2010	(r207112)
@@ -262,15 +262,17 @@ int cvm_oct_spi_init(struct ifnet *ifp)
 		sc = device_get_softc(device_get_parent(priv->dev));
 
 		rid = 0;
-		sc->sc_spi_irq = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ, &rid,
-						    CVMX_IRQ_RML, CVMX_IRQ_RML,
-						    1, RF_ACTIVE);
+		sc->sc_spi_irq = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ,
+						    &rid, CVMX_IRQ_RML,
+						    CVMX_IRQ_RML, 1,
+						    RF_ACTIVE);
 		if (sc->sc_spi_irq == NULL) {
 			device_printf(sc->sc_dev, "could not allocate SPI irq");
 			return ENXIO;
 		}
 
-		error = bus_setup_intr(sc->sc_dev, sc->sc_spi_irq, INTR_TYPE_NET,
+		error = bus_setup_intr(sc->sc_dev, sc->sc_spi_irq,
+				       INTR_TYPE_NET | INTR_MPSAFE,
 				       cvm_oct_spi_rml_interrupt, NULL,
 				       &number_spi_ports, NULL);
 		if (error != 0) {

Modified: user/jmallett/octeon/sys/mips/cavium/octe/ethernet.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/octe/ethernet.c	Fri Apr 23 10:27:48 2010	(r207111)
+++ user/jmallett/octeon/sys/mips/cavium/octe/ethernet.c	Fri Apr 23 10:33:32 2010	(r207112)
@@ -240,7 +240,7 @@ static void cvm_oct_configure_common_hw(
 		return;
         }
 
-        error = bus_setup_intr(bus, sc->sc_rx_irq, INTR_TYPE_NET,
+        error = bus_setup_intr(bus, sc->sc_rx_irq, INTR_TYPE_NET | INTR_MPSAFE,
 			       cvm_oct_do_interrupt, NULL, cvm_oct_device,
 			       NULL);
         if (error != 0) {


More information about the svn-src-user mailing list