cvs commit: src/sys/dev/netif/fxp if_fxp.c

Sepherosa Ziehau sepherosa at gmail.com
Wed Jun 15 03:41:12 PDT 2005


@@ -680,14 +670,21 @@ fxp_attach(device_t dev)
 	ifq_set_maxlen(&ifp->if_snd, FXP_NTXCB - 1);
 	ifq_set_ready(&ifp->if_snd);
 
-	splx(s);
+	error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
+			       fxp_intr, sc, &sc->ih, NULL);
+	if (error) {
+		if (sc->flags & FXP_FLAG_SERIAL_MEDIA)
+			ifmedia_removeall(&sc->sc_media);
+		device_printf(dev, "could not setup irq\n");

We forgot ether_ifdetach() here.

+		goto fail;
+	}
+
 	return (0);

On 6/15/05, Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> joerg       2005/06/14 10:01:17 PDT
> 
> DragonFly src repository
> 
>   Modified files:
>     sys/dev/netif/fxp    if_fxp.c
>   Log:
>   - convert to critical sections
>   - hook up bus_setup_intr last
> 
>   Revision  Changes    Path
>   1.34      +40 -37    src/sys/dev/netif/fxp/if_fxp.c
> 
> 
> http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/fxp/if_fxp.c.diff?r1=1.33&r2=1.34&f=u
> 


-- 
Live Free or Die






More information about the Commits mailing list