Module Name:    src
Committed By:   sborrill
Date:           Fri Nov 13 20:57:27 UTC 2009

Modified Files:
        src/sys/dev/ic [netbsd-5]: hme.c

Log Message:
Pull up the following revisions(s) (requested by jakllsch in ticket #1133):
        sys/dev/ic/hme.c:       revision 1.84 via patch

Use hme_init() to provide a non-NULL ifp->if_init.


To generate a diff of this commit:
cvs rdiff -u -r1.66.10.3 -r1.66.10.4 src/sys/dev/ic/hme.c

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/hme.c
diff -u src/sys/dev/ic/hme.c:1.66.10.3 src/sys/dev/ic/hme.c:1.66.10.4
--- src/sys/dev/ic/hme.c:1.66.10.3	Fri May  1 01:56:16 2009
+++ src/sys/dev/ic/hme.c	Fri Nov 13 20:57:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hme.c,v 1.66.10.3 2009/05/01 01:56:16 snj Exp $	*/
+/*	$NetBSD: hme.c,v 1.66.10.4 2009/11/13 20:57:27 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.66.10.3 2009/05/01 01:56:16 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.66.10.4 2009/11/13 20:57:27 sborrill Exp $");
 
 /* #define HMEDEBUG */
 
@@ -91,7 +91,7 @@
 void		hme_tick(void *);
 void		hme_watchdog(struct ifnet *);
 void		hme_shutdown(void *);
-int		hme_init(struct hme_softc *);
+int		hme_init(struct ifnet *);
 void		hme_meminit(struct hme_softc *);
 void		hme_mifinit(struct hme_softc *);
 void		hme_reset(struct hme_softc *);
@@ -238,6 +238,7 @@
 	ifp->if_softc = sc;
 	ifp->if_start = hme_start;
 	ifp->if_ioctl = hme_ioctl;
+	ifp->if_init = hme_init;
 	ifp->if_watchdog = hme_watchdog;
 	ifp->if_flags =
 	    IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
@@ -338,7 +339,7 @@
 	int s;
 
 	s = splnet();
-	(void)hme_init(sc);
+	(void)hme_init(&sc->sc_ethercom.ec_if);
 	splx(s);
 }
 
@@ -453,10 +454,10 @@
  * and transmit/receive descriptor rings.
  */
 int
-hme_init(sc)
-	struct hme_softc *sc;
+hme_init(ifp)
+	struct ifnet *ifp;
 {
-	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
+	struct hme_softc *sc = (struct hme_softc *)ifp->if_softc;
 	bus_space_tag_t t = sc->sc_bustag;
 	bus_space_handle_t seb = sc->sc_seb;
 	bus_space_handle_t etx = sc->sc_etx;
@@ -1402,14 +1403,14 @@
 				hme_setladrf(sc);
 			else {
 				ifp->if_flags |= IFF_UP;
-				error = hme_init(sc);
+				error = hme_init(ifp);
 			}
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
 		default:
 			ifp->if_flags |= IFF_UP;
-			error = hme_init(sc);
+			error = hme_init(ifp);
 			break;
 		}
 		break;
@@ -1433,7 +1434,7 @@
 			 * If interface is marked up and it is stopped, then
 			 * start it.
 			 */
-			error = hme_init(sc);
+			error = hme_init(ifp);
 		} else if ((ifp->if_flags & IFF_UP) != 0) {
 			/*
 			 * If setting debug or promiscuous mode, do not reset
@@ -1446,13 +1447,13 @@
 				    == (sc->sc_if_flags & (~RESETIGN)))
 					hme_setladrf(sc);
 				else
-					error = hme_init(sc);
+					error = hme_init(ifp);
 			}
 #undef RESETIGN
 		}
 
 		if (sc->sc_ec_capenable != sc->sc_ethercom.ec_capenable)
-			error = hme_init(sc);
+			error = hme_init(ifp);
 
 		break;
 

Reply via email to