if_cs.c (39937) | if_cs.c (40565) |
---|---|
1/* 2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. 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 --- 13 unchanged lines hidden (view full) --- 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 */ 28 29/* | 1/* 2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. 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 --- 13 unchanged lines hidden (view full) --- 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 */ 28 29/* |
30 * $Id: if_cs.c,v 1.4 1998/08/27 22:41:18 msmith Exp $ | 30 * $Id: if_cs.c,v 1.5 1998/10/04 02:11:15 msmith Exp $ |
31 * 32 * Device driver for Crystal Semiconductor CS8920 based ethernet 33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997 34 */ 35 36/* #define CS_DEBUG */ 37#include "cs.h" 38#include "bpfilter.h" --- 64 unchanged lines hidden (view full) --- 103static u_long cs_unit = NCS; 104 105static int cs_recv_delay = 570; 106SYSCTL_INT(_machdep, OID_AUTO, cs_recv_delay, CTLFLAG_RW, &cs_recv_delay, 0, ""); 107 108static int cs_attach __P((struct cs_softc *, int, int)); 109static int cs_attach_isa __P((struct isa_device *)); 110static void cs_init __P((void *)); | 31 * 32 * Device driver for Crystal Semiconductor CS8920 based ethernet 33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997 34 */ 35 36/* #define CS_DEBUG */ 37#include "cs.h" 38#include "bpfilter.h" --- 64 unchanged lines hidden (view full) --- 103static u_long cs_unit = NCS; 104 105static int cs_recv_delay = 570; 106SYSCTL_INT(_machdep, OID_AUTO, cs_recv_delay, CTLFLAG_RW, &cs_recv_delay, 0, ""); 107 108static int cs_attach __P((struct cs_softc *, int, int)); 109static int cs_attach_isa __P((struct isa_device *)); 110static void cs_init __P((void *)); |
111static ointhand2_t csintr; |
|
111static int cs_ioctl __P((struct ifnet *, u_long, caddr_t)); 112static int cs_probe __P((struct isa_device *)); 113static int cs_cs89x0_probe __P((struct cs_softc *, 114 u_int *, int *, int, int, int)); 115static void cs_start __P((struct ifnet *)); 116static void cs_stop __P((struct cs_softc *)); 117static void cs_reset __P((struct cs_softc *)); 118static void cs_watchdog __P((struct ifnet *)); --- 509 unchanged lines hidden (view full) --- 628 629static int 630cs_attach_isa(struct isa_device *dev) 631{ 632 int unit=dev->id_unit; 633 struct cs_softc *sc=&cs_softc[unit]; 634 int flags=dev->id_flags; 635 | 112static int cs_ioctl __P((struct ifnet *, u_long, caddr_t)); 113static int cs_probe __P((struct isa_device *)); 114static int cs_cs89x0_probe __P((struct cs_softc *, 115 u_int *, int *, int, int, int)); 116static void cs_start __P((struct ifnet *)); 117static void cs_stop __P((struct cs_softc *)); 118static void cs_reset __P((struct cs_softc *)); 119static void cs_watchdog __P((struct ifnet *)); --- 509 unchanged lines hidden (view full) --- 629 630static int 631cs_attach_isa(struct isa_device *dev) 632{ 633 int unit=dev->id_unit; 634 struct cs_softc *sc=&cs_softc[unit]; 635 int flags=dev->id_flags; 636 |
637 dev->id_ointr = csintr; |
|
636 return cs_attach(sc, unit, flags); 637} 638 639/* 640 * Initialize the board 641 */ 642static void 643cs_init(void *xsc) --- 222 unchanged lines hidden (view full) --- 866 if (!(ifp->if_flags & IFF_OACTIVE)) { 867 cs_start(ifp); 868 } 869} 870 871/* 872 * Handle interrupts 873 */ | 638 return cs_attach(sc, unit, flags); 639} 640 641/* 642 * Initialize the board 643 */ 644static void 645cs_init(void *xsc) --- 222 unchanged lines hidden (view full) --- 868 if (!(ifp->if_flags & IFF_OACTIVE)) { 869 cs_start(ifp); 870 } 871} 872 873/* 874 * Handle interrupts 875 */ |
874void | 876static void |
875csintr(int unit) 876{ 877 struct cs_softc *sc = &cs_softc[unit]; 878 879 csintr_sc(sc, unit); 880} 881 882/* --- 517 unchanged lines hidden --- | 877csintr(int unit) 878{ 879 struct cs_softc *sc = &cs_softc[unit]; 880 881 csintr_sc(sc, unit); 882} 883 884/* --- 517 unchanged lines hidden --- |