Subject: Re: Arp problems on recent -current kernel?
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
List: port-pmax
Date: 04/19/1995 01:50:34
you need a change similar to the ones below, in your if_le.
(the following changes were pulled fromthe sparc if_le, so may or may
not drop right in.)


chris
===================================================================
RCS file: /usr/users/cgd/NetBSD/cvs/src/sys/arch/sparc/dev/if_le.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -c -r1.1.1.3 -r1.1.1.4
*** 1.1.1.3	1995/02/19 07:18:12
--- 1.1.1.4	1995/04/17 03:16:32
***************
*** 1,4 ****
! /*	$NetBSD: if_le.c,v 1.18 1995/02/16 21:50:45 pk Exp $ */
  
  /*-
   * Copyright (c) 1982, 1992, 1993
--- 1,4 ----
! /*	$NetBSD: if_le.c,v 1.20 1995/04/12 08:47:21 pk Exp $ */
  
  /*-
   * Copyright (c) 1982, 1992, 1993
***************
*** 156,162 ****
  void	lesetladrf(struct le_softc *);
  void	lereset(struct device *);
  int	leinit(int);
! int	lestart(struct ifnet *);
  int	leintr(void *);
  void	lexint(struct le_softc *);
  void	lerint(struct le_softc *);
--- 156,162 ----
  void	lesetladrf(struct le_softc *);
  void	lereset(struct device *);
  int	leinit(int);
! void	lestart(struct ifnet *);
  int	leintr(void *);
  void	lexint(struct le_softc *);
  void	lerint(struct le_softc *);
***************
*** 264,270 ****
  	ifp->if_unit = sc->sc_dev.dv_unit;
  	ifp->if_name = "le";
  	ifp->if_ioctl = leioctl;
- 	ifp->if_output = ether_output;
  	ifp->if_start = lestart;
  	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
  #ifdef IFF_NOTRAILERS
--- 264,269 ----
***************
*** 474,480 ****
   * off of the interface queue, and copy it to the interface
   * before starting the output.
   */
! int
  lestart(ifp)
  	register struct ifnet *ifp;
  {
--- 473,479 ----
   * off of the interface queue, and copy it to the interface
   * before starting the output.
   */
! void
  lestart(ifp)
  	register struct ifnet *ifp;
  {
***************
*** 484,493 ****
  	register int len;
  
  	if ((sc->sc_if.if_flags & IFF_RUNNING) == 0)
! 		return (0);
  	IF_DEQUEUE(&sc->sc_if.if_snd, m);
  	if (m == 0)
! 		return (0);
  	len = leput(sc->sc_r2->ler2_tbuf[0], m);
  #if NBPFILTER > 0
  	/*
--- 483,492 ----
  	register int len;
  
  	if ((sc->sc_if.if_flags & IFF_RUNNING) == 0)
! 		return;
  	IF_DEQUEUE(&sc->sc_if.if_snd, m);
  	if (m == 0)
! 		return;
  	len = leput(sc->sc_r2->ler2_tbuf[0], m);
  #if NBPFILTER > 0
  	/*
***************
*** 507,513 ****
  	tmd->tmd2 = -len | LE_XMD2_ONES;
  	tmd->tmd1_bits = LE_T1_OWN | LE_T1_STP | LE_T1_ENP;
  	sc->sc_if.if_flags |= IFF_OACTIVE;
! 	return (0);
  }
  
  int
--- 506,512 ----
  	tmd->tmd2 = -len | LE_XMD2_ONES;
  	tmd->tmd1_bits = LE_T1_OWN | LE_T1_STP | LE_T1_ENP;
  	sc->sc_if.if_flags |= IFF_OACTIVE;
! 	return;
  }
  
  int
***************
*** 868,877 ****
  		switch (ifa->ifa_addr->sa_family) {
  #ifdef INET
  		case AF_INET:
! 			(void)leinit(ifp->if_unit);	/* before arpwhohas */
! 			((struct arpcom *)ifp)->ac_ipaddr =
! 				IA_SIN(ifa)->sin_addr;
! 			arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
  			break;
  #endif
  #ifdef NS
--- 867,874 ----
  		switch (ifa->ifa_addr->sa_family) {
  #ifdef INET
  		case AF_INET:
! 			(void)leinit(ifp->if_unit);
! 			arp_ifinit(&sc->sc_ac, ifa);
  			break;
  #endif
  #ifdef NS