Module Name: src
Committed By: cegger
Date: Fri Apr 17 15:22:36 UTC 2009
Modified Files:
src/sys/dev/ic: tulip.c tulipvar.h
Log Message:
change tlp_attach() to return an error code on failure.
To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/ic/tulip.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/tulipvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/tulip.c
diff -u src/sys/dev/ic/tulip.c:1.168 src/sys/dev/ic/tulip.c:1.169
--- src/sys/dev/ic/tulip.c:1.168 Fri Apr 17 15:16:52 2009
+++ src/sys/dev/ic/tulip.c Fri Apr 17 15:22:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $ */
+/* $NetBSD: tulip.c,v 1.169 2009/04/17 15:22:35 cegger Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.168 2009/04/17 15:16:52 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.169 2009/04/17 15:22:35 cegger Exp $");
#include "bpfilter.h"
@@ -186,7 +186,7 @@
*
* Attach a Tulip interface to the system.
*/
-void
+int
tlp_attach(struct tulip_softc *sc, const uint8_t *enaddr)
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
@@ -540,7 +540,7 @@
else
pmf_class_network_register(self, ifp);
- return;
+ return 0;
/*
* Free any resources we've allocated during the failed attach
@@ -567,7 +567,7 @@
fail_1:
bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg);
fail_0:
- return;
+ return error;
}
/*
Index: src/sys/dev/ic/tulipvar.h
diff -u src/sys/dev/ic/tulipvar.h:1.63 src/sys/dev/ic/tulipvar.h:1.64
--- src/sys/dev/ic/tulipvar.h:1.63 Fri Apr 17 10:20:33 2009
+++ src/sys/dev/ic/tulipvar.h Fri Apr 17 15:22:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tulipvar.h,v 1.63 2009/04/17 10:20:33 cegger Exp $ */
+/* $NetBSD: tulipvar.h,v 1.64 2009/04/17 15:22:35 cegger Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -587,7 +587,7 @@
extern const struct tulip_mediasw tlp_asix_mediasw;
extern const struct tulip_mediasw tlp_rs7112_mediasw;
-void tlp_attach(struct tulip_softc *, const uint8_t *);
+int tlp_attach(struct tulip_softc *, const uint8_t *);
int tlp_activate(device_t, enum devact);
int tlp_detach(struct tulip_softc *);
int tlp_intr(void *);