if_ex.c (29877) | if_ex.c (31016) |
---|---|
1/* 2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 1996, Javier Mart�n Rueda (jmrueda@diatel.upm.es) 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $Id$ | 27 * $Id: if_ex.c,v 1.7 1997/09/26 17:17:43 msmith Exp $ |
28 */ 29 30/* 31 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver 32 * 33 * Revision history: 34 * 35 * 30-Oct-1996: first beta version. Inet and BPF supported, but no multicast. --- 208 unchanged lines hidden (view full) --- 244} 245 246 247int ex_attach(struct isa_device *dev) 248{ 249 int unit = dev->id_unit; 250 struct ex_softc *sc = &ex_sc[unit]; 251 struct ifnet *ifp = &sc->arpcom.ac_if; | 28 */ 29 30/* 31 * Intel EtherExpress Pro/10, Pro/10+ Ethernet driver 32 * 33 * Revision history: 34 * 35 * 30-Oct-1996: first beta version. Inet and BPF supported, but no multicast. --- 208 unchanged lines hidden (view full) --- 244} 245 246 247int ex_attach(struct isa_device *dev) 248{ 249 int unit = dev->id_unit; 250 struct ex_softc *sc = &ex_sc[unit]; 251 struct ifnet *ifp = &sc->arpcom.ac_if; |
252 struct ifaddr *ifa; 253 struct sockaddr_dl *sdl; | |
254 255 DODEBUG(Start_End, printf("ex_attach%d: start\n", unit);); 256 257 /* 258 * Initialize the ifnet structure. 259 */ 260 ifp->if_softc = sc; 261 ifp->if_unit = unit; --- 126 unchanged lines hidden (view full) --- 388 389 390void ex_start(struct ifnet *ifp) 391{ 392 int unit = ifp->if_unit; 393 register struct ex_softc *sc = &ex_sc[unit]; 394 register int iobase = sc->iobase; 395 int i, s, len, data_len, avail, dest, next; | 252 253 DODEBUG(Start_End, printf("ex_attach%d: start\n", unit);); 254 255 /* 256 * Initialize the ifnet structure. 257 */ 258 ifp->if_softc = sc; 259 ifp->if_unit = unit; --- 126 unchanged lines hidden (view full) --- 386 387 388void ex_start(struct ifnet *ifp) 389{ 390 int unit = ifp->if_unit; 391 register struct ex_softc *sc = &ex_sc[unit]; 392 register int iobase = sc->iobase; 393 int i, s, len, data_len, avail, dest, next; |
396 unsigned char tmp16[2], *cP; | 394 unsigned char tmp16[2]; |
397 struct mbuf *opkt; 398 register struct mbuf *m; 399 400 DODEBUG(Start_End, printf("ex_start%d: start\n", unit);); 401 402 s = splimp(); 403 404 /* --- 160 unchanged lines hidden (view full) --- 565} 566 567 568void exintr(int unit) 569{ 570 struct ex_softc *sc = &ex_sc[unit]; 571 struct ifnet *ifp = &sc->arpcom.ac_if; 572 int iobase = sc->iobase; | 395 struct mbuf *opkt; 396 register struct mbuf *m; 397 398 DODEBUG(Start_End, printf("ex_start%d: start\n", unit);); 399 400 s = splimp(); 401 402 /* --- 160 unchanged lines hidden (view full) --- 563} 564 565 566void exintr(int unit) 567{ 568 struct ex_softc *sc = &ex_sc[unit]; 569 struct ifnet *ifp = &sc->arpcom.ac_if; 570 int iobase = sc->iobase; |
573 int s, int_status, send_pkts; | 571 int int_status, send_pkts; |
574 575 DODEBUG(Start_End, printf("exintr%d: start\n", unit);); 576 577#ifdef EXDEBUG 578 if (++exintr_count != 1) 579 printf("WARNING: nested interrupt (%d). Mail the author.\n", exintr_count); 580#endif 581 --- 284 unchanged lines hidden (view full) --- 866 DODEBUG(Start_End, printf("\nex_ioctl%d: finish\n", ifp->if_unit);); 867 return(error); 868} 869 870 871void ex_reset(int unit) 872{ 873 struct ex_softc *sc = &ex_sc[unit]; | 572 573 DODEBUG(Start_End, printf("exintr%d: start\n", unit);); 574 575#ifdef EXDEBUG 576 if (++exintr_count != 1) 577 printf("WARNING: nested interrupt (%d). Mail the author.\n", exintr_count); 578#endif 579 --- 284 unchanged lines hidden (view full) --- 864 DODEBUG(Start_End, printf("\nex_ioctl%d: finish\n", ifp->if_unit);); 865 return(error); 866} 867 868 869void ex_reset(int unit) 870{ 871 struct ex_softc *sc = &ex_sc[unit]; |
874 struct ifnet *ifp = &sc->arpcom.ac_if; | |
875 int s; 876 877 DODEBUG(Start_End, printf("ex_reset%d: start\n", unit);); 878 879 s = splimp(); 880 881 ex_stop(unit); 882 ex_init(sc); 883 884 splx(s); 885 886 DODEBUG(Start_End, printf("ex_reset%d: finish\n", unit);); 887} 888 889 890void ex_watchdog(struct ifnet *ifp) 891{ | 872 int s; 873 874 DODEBUG(Start_End, printf("ex_reset%d: start\n", unit);); 875 876 s = splimp(); 877 878 ex_stop(unit); 879 ex_init(sc); 880 881 splx(s); 882 883 DODEBUG(Start_End, printf("ex_reset%d: finish\n", unit);); 884} 885 886 887void ex_watchdog(struct ifnet *ifp) 888{ |
892 struct ex_softc *sc = &ex_sc[ifp->if_unit]; | |
893 894 DODEBUG(Start_End, printf("ex_watchdog%d: start\n", ifp->if_unit);); 895 896 ifp->if_flags &= ~IFF_OACTIVE; 897 DODEBUG(Status, printf("OIDLE watchdog\n");); 898 ifp->if_oerrors++; 899 ex_reset(ifp->if_unit); 900 ex_start(ifp); --- 44 unchanged lines hidden --- | 889 890 DODEBUG(Start_End, printf("ex_watchdog%d: start\n", ifp->if_unit);); 891 892 ifp->if_flags &= ~IFF_OACTIVE; 893 DODEBUG(Status, printf("OIDLE watchdog\n");); 894 ifp->if_oerrors++; 895 ex_reset(ifp->if_unit); 896 ex_start(ifp); --- 44 unchanged lines hidden --- |