On Fri, Dec 02, 2011 at 12:02:19PM +0100, Jan Klemkow wrote:
> Hello,
>
> i have found an other failed error handling
> with interrupt locking. Here is a diff which
> should patch this.
i don't think this compiles.
your label is out: and the goto uses err.
> bye,
> Jan
>
> Index: fxp.c
> ===================================================================
> RCS file: /mount/cvsdev/cvs/openbsd/src/sys/dev/ic/fxp.c,v
> retrieving revision 1.108
> diff -u -w -p -r1.108 fxp.c
> --- fxp.c 7 Apr 2011 15:30:16 -0000 1.108
> +++ fxp.c 1 Dec 2011 16:04:35 -0000
> @@ -1323,7 +1323,7 @@ fxp_init(void *xsc)
> FXP_CFG_SYNC(sc, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
> if (!(cbp->cb_status & htole16(FXP_CB_STATUS_C))) {
> printf("%s: config command timeout\n", sc->sc_dev.dv_xname);
> - return;
> + goto err;
> }
>
> /*
> @@ -1354,7 +1354,7 @@ fxp_init(void *xsc)
> FXP_IAS_SYNC(sc, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
> if (!(cb_ias->cb_status & htole16(FXP_CB_STATUS_C))) {
> printf("%s: IAS command timeout\n", sc->sc_dev.dv_xname);
> - return;
> + goto err;
> }
>
> /* Again, this time really upload the multicast addresses */
> @@ -1445,6 +1445,10 @@ fxp_init(void *xsc)
> * Start stats updater.
> */
> timeout_add_sec(&sc->stats_update_to, 1);
> +
> + return;
> + out:
> + splx(s);
> }
>
> /*