Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 1995 09:07:26 -0500 (GMT-0500)
From:      "Serge A. Babkin" <babkin@hq.icb.chel.su>
To:        phk@ref.tfs.com (Poul-Henning Kamp)
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Fix for 3C509 (ep) driver
Message-ID:  <199503231407.JAA03926@hq.icb.chel.su>
In-Reply-To: <199503220845.AAA04589@ref.tfs.com> from "Poul-Henning Kamp" at Mar 22, 95 00:45:07 am

next in thread | previous in thread | raw e-mail | index | archive | help
I done some fixes in ep driver:

#start here
cd /usr/src/sys/i386/isa

patch if_ep.c <<EOF
39a40,50
> /*
>  *  March 23 1995
>  *
>  *  Promiscuous mode added and interrupt logic slightly changed
>  *  to reduce the number of adapter failures (based on logic of
>  *  BSDI's ef driver) by:
>  *          Serge Babkin
>  *          Chelindbank (Chelyabinsk, Russia)
>  *          babkin@hq.icb.chel.su
>  */
> 
454,455c465,470
<     outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
< 	 FIL_GROUP | FIL_BRDCST);
---
> 	if(ep_ftst(F_PROMISC))
> 		outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
> 		 FIL_GROUP | FIL_BRDCST | FIL_ALL);
> 	else
> 		outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL |
> 		 FIL_GROUP | FIL_BRDCST);
646,647c661,662
<     outw(BASE + EP_COMMAND, SET_INTR_MASK);	/* disable all Ints */
<     outw(BASE + EP_COMMAND, C_INTR_LATCH);	/* ACK int Latch */
---
> rescan:
>     /* outw(BASE + EP_COMMAND, SET_INTR_MASK);	/* disable all Ints */
675c690
< 	    printf("ep%d: Status: %x\n", unit, status);
---
> 	    printf("ep%d: Status: %x\n", unit, status); 
719c734,739
<     outw(BASE + EP_COMMAND, SET_INTR_MASK | S_5_INTS);
---
>     /* outw(BASE + EP_COMMAND, SET_INTR_MASK | S_5_INTS); */
> 
>     outw(BASE + EP_COMMAND, C_INTR_LATCH);	/* ACK int Latch */
> 
>     if ((status = inw(BASE + EP_STATUS)) & S_5_INTS) 
> 	goto rescan;
1018a1039,1048
> 
> 	if ( (ifp->if_flags & IFF_PROMISC) &&  !ep_ftst(F_PROMISC) ) {
> 	    ep_fset(F_PROMISC);
> 	    epinit(ifp->if_unit);
> 	    }
> 	else if( !(ifp->if_flags & IFF_PROMISC) && ep_ftst(F_PROMISC) ) {
> 	    ep_frst(F_PROMISC);
> 	    epinit(ifp->if_unit);
> 	    }
> 
EOF

patch if_epreg.h <<EOF
32a33,42
> /*
>  *  March 23 1995
>  *
>  *  Promiscuous mode added and interrupt logic slightly changed
>  *  to reduce the number of adapter failures (based on logic of
>  *  BSDI's ef driver) by:
>  *          Serge Babkin
>  *          Chelindbank (Chelyabinsk, Russia)
>  *          babkin@hq.icb.chel.su
>  */
57a68
> #define		F_PROMISC    0x8
EOF
# that's all


		Serge Babkin

! (babkin@hq.icb.chel.su)
! Headquarter of Joint Stock Bank "Chelindbank"
! Chelyabinsk, Russia



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503231407.JAA03926>