Subject: Re: netatalk-asun with 'ti'/ga620
To: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 06/27/2001 17:52:48
--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Jun 26, 2001 at 03:15:23AM +0200, Markus W Kilbinger wrote:
> How to get netatalk-asun-2.1.3nb5 running on a 'ti'/ga620 nic?
> 
> When/how ever I try it the 'ti' device looses its link -> fails and
> finally the link state is restored:
> 
>   Jun 26 02:58:12 atalkd[7658]: restart (1.4b2+asun2.1.3)
>   Jun 26 02:58:14 atalkd[7658]: zip_getnetinfo for ti0
>   Jun 26 02:58:14 atalkd[7658]: zip_getnetinfo sendto: Network is down
>   Jun 26 02:58:14 atalkd[7658]: bootaddr (zip_getnetinfo): Network is down
>   Jun 26 02:58:14 atalkd: difaddr(0.0): Can't assign requested address
>   Jun 26 02:58:14 atalkd: difaddr(0.0): Can't assign requested address
> 
> Any way to avoid this link lost? Or how to solve this problem?

Hi,
can you try the attached patch ?

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: if_ti.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/if_ti.c,v
retrieving revision 1.25
diff -u -r1.25 if_ti.c
--- if_ti.c	2001/06/12 15:17:25	1.25
+++ if_ti.c	2001/06/27 15:52:25
@@ -2599,14 +2599,17 @@
 	struct ifaddr *ifa = (struct ifaddr *) data;
 	struct ti_softc *sc = ifp->if_softc;
 
+	if ((ifp->if_flags & IFF_UP) == 0) {
+		ifp->if_flags |= IFF_UP;
+		ti_init(sc);
+	}
+		
 	switch (cmd) {
 	case SIOCSIFADDR:
-		ifp->if_flags |= IFF_UP;
 
 		switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
 		case AF_INET:
-			ti_init(sc);
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
@@ -2621,13 +2624,10 @@
 			 else
 				bcopy(ina->x_host.c_host, LLADDR(ifp->if_sadl),
 				    ifp->if_addrlen);
-			 /* Set new address. */
-			 ti_init(sc);
 			 break;
 		    }
 #endif
 		default:
-			ti_init(sc);
 			break;
 		}
 		break;

--C7zPtVaVf+AK4Oqc--