Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Make Econet code compile again.



details:   https://anonhg.NetBSD.org/src/rev/af293b790219
branches:  trunk
changeset: 588227:af293b790219
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sun Feb 12 10:32:46 2006 +0000

description:
Make Econet code compile again.

diffstat:

 sys/arch/acorn26/ioc/if_eca.c |   6 +++---
 sys/net/if_ecosubr.c          |  28 ++++++++++++----------------
 sys/sys/mbuf.h                |   4 +++-
 3 files changed, 18 insertions(+), 20 deletions(-)

diffs (157 lines):

diff -r efac8e9cf104 -r af293b790219 sys/arch/acorn26/ioc/if_eca.c
--- a/sys/arch/acorn26/ioc/if_eca.c     Sun Feb 12 10:30:30 2006 +0000
+++ b/sys/arch/acorn26/ioc/if_eca.c     Sun Feb 12 10:32:46 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_eca.c,v 1.4 2002/10/02 03:25:47 thorpej Exp $       */
+/*     $NetBSD: if_eca.c,v 1.5 2006/02/12 10:32:46 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -29,7 +29,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: if_eca.c,v 1.4 2002/10/02 03:25:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_eca.c,v 1.5 2006/02/12 10:32:46 bjh21 Exp $");
 
 #include <sys/device.h>
 #include <sys/malloc.h>
@@ -325,7 +325,7 @@
         */
 
        totlen = 0;
-       n = NULL;
+       m = n = NULL;
        while (totlen < sc->sc_ec.ec_if.if_mtu + ECO_HDR_LEN) {
                MGETHDR(m, flags, MT_DATA);
                if (m == NULL)
diff -r efac8e9cf104 -r af293b790219 sys/net/if_ecosubr.c
--- a/sys/net/if_ecosubr.c      Sun Feb 12 10:30:30 2006 +0000
+++ b/sys/net/if_ecosubr.c      Sun Feb 12 10:32:46 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ecosubr.c,v 1.18 2005/12/11 12:24:51 christos Exp $ */
+/*     $NetBSD: if_ecosubr.c,v 1.19 2006/02/12 10:32:46 bjh21 Exp $    */
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.18 2005/12/11 12:24:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.19 2006/02/12 10:32:46 bjh21 Exp $");
 
 #include "bpfilter.h"
 #include "opt_inet.h"
@@ -66,7 +66,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.18 2005/12/11 12:24:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.19 2006/02/12 10:32:46 bjh21 Exp $");
 
 #include <sys/errno.h>
 #include <sys/kernel.h>
@@ -93,8 +93,6 @@
 #include <netinet/in_var.h>
 #endif
 
-#define ECO_MAUX_RETRYPARMS 0
-
 struct eco_retryparms {
        int     erp_delay;
        int     erp_count;
@@ -137,8 +135,7 @@
        if_alloc_sadl(ifp);
        memcpy(LLADDR(ifp->if_sadl), lla, ifp->if_addrlen);
 
-       /* XXX cast safe? */
-       ifp->if_broadcastaddr = (u_int8_t *)eco_broadcastaddr;
+       ifp->if_broadcastaddr = eco_broadcastaddr;
 
        LIST_INIT(&ec->ec_retries);
 
@@ -179,7 +176,7 @@
        struct mbuf *m = m0, *mcopy = NULL;
        struct rtentry *rt;
        int hdrcmplt;
-       int delay, count;
+       int retry_delay, retry_count;
        struct m_tag *mtag;
        struct eco_retryparms *erp;
 #ifdef INET
@@ -230,8 +227,8 @@
        IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
 
        hdrcmplt = 0;
-       delay = hz / 16;
-       count = 16;
+       retry_delay = hz / 16;
+       retry_count = 16;
        switch (dst->sa_family) {
 #ifdef INET
        case AF_INET:
@@ -322,8 +319,8 @@
                if (mtag == NULL)
                        senderr(ENOBUFS);
                erp = (struct eco_retryparms *)(mtag + 1);
-               erp->erp_delay = delay;
-               erp->erp_count = count;
+               erp->erp_delay = retry_delay;
+               erp->erp_count = retry_count;
        }
 
 #ifdef PFIL_HOOKS
@@ -333,7 +330,7 @@
                return (0);
 #endif
 
-       return ifq_enqueue(&ifp->if_snd, m ALTQ_COMMA ALTQ_DECL(&pktattr));
+       return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
 
 bad:
        if (m)
@@ -826,7 +823,7 @@
  * Econet retry handling.
  */
 static void
-eco_defer(struct ifnet *ifp, struct mbuf *m, int delay)
+eco_defer(struct ifnet *ifp, struct mbuf *m, int retry_delay)
 {
        struct ecocom *ec = (struct ecocom *)ifp;
        struct eco_retry *er;
@@ -843,7 +840,7 @@
        s = splnet();
        LIST_INSERT_HEAD(&ec->ec_retries, er, er_link);
        splx(s);
-       callout_reset(&er->er_callout, delay, eco_retry, er);
+       callout_reset(&er->er_callout, retry_delay, eco_retry, er);
 }
 
 static void
@@ -868,7 +865,6 @@
 
        ifp = er->er_ifp;
        m = er->er_packet;
-       len = m->m_pkthdr.len;
        LIST_REMOVE(er, er_link);
        (void)ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(NULL));
        FREE(er, M_TEMP);
diff -r efac8e9cf104 -r af293b790219 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Sun Feb 12 10:30:30 2006 +0000
+++ b/sys/sys/mbuf.h    Sun Feb 12 10:32:46 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.121 2006/01/31 17:48:27 christos Exp $      */
+/*     $NetBSD: mbuf.h,v 1.122 2006/02/12 10:32:46 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001 The NetBSD Foundation, Inc.
@@ -914,6 +914,8 @@
 
 #define        PACKET_TAG_INET6                        26 /* IPv6 info */
 
+#define        PACKET_TAG_ECO_RETRYPARMS               27 /* Econet retry parameters */
+
 /*
  * Return the number of bytes in the mbuf chain, m.
  */



Home | Main Index | Thread Index | Old Index