if_ie.c (38232) | if_ie.c (40565) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993, University of Vermont and State 3 * Agricultural College. 4 * Copyright (c) 1992, 1993, Garrett A. Wollman. 5 * 6 * Portions: 7 * Copyright (c) 1990, 1991, William F. Jolitz 8 * Copyright (c) 1990, The Regents of the University of California --- 33 unchanged lines hidden (view full) --- 42 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 * SUCH DAMAGE. 49 * | 1/*- 2 * Copyright (c) 1992, 1993, University of Vermont and State 3 * Agricultural College. 4 * Copyright (c) 1992, 1993, Garrett A. Wollman. 5 * 6 * Portions: 7 * Copyright (c) 1990, 1991, William F. Jolitz 8 * Copyright (c) 1990, The Regents of the University of California --- 33 unchanged lines hidden (view full) --- 42 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 * SUCH DAMAGE. 49 * |
50 * $Id: if_ie.c,v 1.55 1998/08/10 14:27:32 bde Exp $ | 50 * $Id: if_ie.c,v 1.56 1998/08/10 17:21:48 bde Exp $ |
51 */ 52 53/* 54 * Intel 82586 Ethernet chip 55 * Register, bit, and structure definitions. 56 * 57 * Written by GAW with reference to the Clarkson Packet Driver code for this 58 * chip written by Russ Nelson and others. --- 112 unchanged lines hidden (view full) --- 171 172/* Forward declaration */ 173struct ie_softc; 174 175static struct mbuf *last_not_for_us; 176 177static int ieprobe(struct isa_device * dvp); 178static int ieattach(struct isa_device * dvp); | 51 */ 52 53/* 54 * Intel 82586 Ethernet chip 55 * Register, bit, and structure definitions. 56 * 57 * Written by GAW with reference to the Clarkson Packet Driver code for this 58 * chip written by Russ Nelson and others. --- 112 unchanged lines hidden (view full) --- 171 172/* Forward declaration */ 173struct ie_softc; 174 175static struct mbuf *last_not_for_us; 176 177static int ieprobe(struct isa_device * dvp); 178static int ieattach(struct isa_device * dvp); |
179static ointhand2_t ieintr; |
|
179static int sl_probe(struct isa_device * dvp); 180static int el_probe(struct isa_device * dvp); 181static int ni_probe(struct isa_device * dvp); 182static int ee16_probe(struct isa_device * dvp); 183 184static int check_ie_present(int unit, caddr_t where, unsigned size); 185static void ieinit(int unit); 186static void ie_stop(int unit); --- 597 unchanged lines hidden (view full) --- 784ieattach(struct isa_device *dvp) 785{ 786 int factor; 787 int unit = dvp->id_unit; 788 struct ie_softc *ie = &ie_softc[unit]; 789 struct ifnet *ifp = &ie->arpcom.ac_if; 790 size_t allocsize; 791 | 180static int sl_probe(struct isa_device * dvp); 181static int el_probe(struct isa_device * dvp); 182static int ni_probe(struct isa_device * dvp); 183static int ee16_probe(struct isa_device * dvp); 184 185static int check_ie_present(int unit, caddr_t where, unsigned size); 186static void ieinit(int unit); 187static void ie_stop(int unit); --- 597 unchanged lines hidden (view full) --- 785ieattach(struct isa_device *dvp) 786{ 787 int factor; 788 int unit = dvp->id_unit; 789 struct ie_softc *ie = &ie_softc[unit]; 790 struct ifnet *ifp = &ie->arpcom.ac_if; 791 size_t allocsize; 792 |
793 dvp->id_ointr = ieintr; 794 |
|
792 /* 793 * based on the amount of memory we have, allocate our tx and rx 794 * resources. 795 */ 796 factor = dvp->id_msize / 16384; 797 ie->nframes = factor * NFRAMES; 798 ie->nrxbufs = factor * NRXBUFS; 799 ie->ntxbufs = factor * NTXBUFS; --- 46 unchanged lines hidden (view full) --- 846 if_attach(ifp); 847 ether_ifattach(ifp); 848 return (1); 849} 850 851/* 852 * What to do upon receipt of an interrupt. 853 */ | 795 /* 796 * based on the amount of memory we have, allocate our tx and rx 797 * resources. 798 */ 799 factor = dvp->id_msize / 16384; 800 ie->nframes = factor * NFRAMES; 801 ie->nrxbufs = factor * NRXBUFS; 802 ie->ntxbufs = factor * NTXBUFS; --- 46 unchanged lines hidden (view full) --- 849 if_attach(ifp); 850 ether_ifattach(ifp); 851 return (1); 852} 853 854/* 855 * What to do upon receipt of an interrupt. 856 */ |
854void | 857static void |
855ieintr(int unit) 856{ 857 register struct ie_softc *ie = &ie_softc[unit]; 858 register u_short status; 859 860 /* Clear the interrupt latch on the 3C507. */ 861 if (ie->hard_type == IE_3C507 862 && (inb(PORT + IE507_CTRL) & EL_CTRL_INTL)) --- 1569 unchanged lines hidden --- | 858ieintr(int unit) 859{ 860 register struct ie_softc *ie = &ie_softc[unit]; 861 register u_short status; 862 863 /* Clear the interrupt latch on the 3C507. */ 864 if (ie->hard_type == IE_3C507 865 && (inb(PORT + IE507_CTRL) & EL_CTRL_INTL)) --- 1569 unchanged lines hidden --- |