1/*
2 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
3 * adapters. By David Greenman, 29-April-1993
4 *
5 * Copyright (C) 1993, David Greenman. This software may be used, modified,
6 * copied, distributed, and sold, in both source and binary form provided
7 * that the above copyright and these terms are retained. Under no
8 * circumstances is the author responsible for the proper functioning
--- 6 unchanged lines hidden (view full) ---
15 *
16 * Thanks to Charles Hannum for proving to me with example code that the
17 * NE1000/2000 support could be added with minimal impact. Without
18 * this, I wouldn't have proceeded in this direction.
19 *
20 */
21
22/*
23 * $Id: if_ed.c,v 1.23 1993/11/22 11:08:14 davidg Exp $
24 */
25
26/*
27 * Modification history
28 *
29 * Revision 2.14 1993/11/22 10:55:30 davidg
30 * change all splnet's to splimp's
31 *
32 * Revision 2.13 1993/11/22 10:53:52 davidg
33 * patch to add support for SMC8216 (Elite-Ultra) boards
34 * from Glen H. Lowe
35 *
36 * Revision 2.12 1993/11/07 18:04:13 davidg
--- 143 unchanged lines hidden (view full) ---
180 u_char txb_next_tx; /* pointer to next buffer ready to xmit */
181 u_short txb_len[8]; /* buffered xmit buffer lengths */
182 u_char tx_page_start; /* first page of TX buffer area */
183 u_char rec_page_start; /* first page of RX ring-buffer */
184 u_char rec_page_stop; /* last page of RX ring-buffer */
185 u_char next_packet; /* pointer to next unread RX packet */
186} ed_softc[NED];
187
188int ed_attach(struct isa_device *);
189void ed_init(int);
190void edintr(int);
191int ed_ioctl(struct ifnet *, int, caddr_t);
192int ed_probe(struct isa_device *);
193void ed_start(struct ifnet *);
194void ed_reset(int, int);
195void ed_watchdog(int);
196static void ed_get_packet(struct ed_softc *, char *, int /*u_short*/);
197static void ed_stop(int);
198
199static inline void ed_rint();
200static inline void ed_xmit();
201static inline char *ed_ring_copy();
202
203void ed_pio_readmem(), ed_pio_writemem();
--- 169 unchanged lines hidden (view full) ---
373 memsize = 8192;
374 isa16bit = 0;
375 break;
376 case ED_TYPE_WD8013EBT:
377 sc->type_str = "WD8013EBT";
378 memsize = 16384;
379 isa16bit = 1;
380 break;
381 case ED_TYPE_WD8013EP: /* also WD8003EP */
382 if (inb(sc->asic_addr + ED_WD_ICR)
383 & ED_WD_ICR_16BIT) {
384 isa16bit = 1;
385 memsize = 16384;
386 sc->type_str = "WD8013EP";
387 } else {
388 isa16bit = 0;
--- 2102 unchanged lines hidden ---
2 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
3 * adapters. By David Greenman, 29-April-1993
4 *
5 * Copyright (C) 1993, David Greenman. This software may be used, modified,
6 * copied, distributed, and sold, in both source and binary form provided
7 * that the above copyright and these terms are retained. Under no
8 * circumstances is the author responsible for the proper functioning
--- 6 unchanged lines hidden (view full) ---
15 *
16 * Thanks to Charles Hannum for proving to me with example code that the
17 * NE1000/2000 support could be added with minimal impact. Without
18 * this, I wouldn't have proceeded in this direction.
19 *
20 */
21
22/*
23 * $Id: if_ed.c,v 1.23 1993/11/22 11:08:14 davidg Exp $
24 */
25
26/*
27 * Modification history
28 *
29 * Revision 2.14 1993/11/22 10:55:30 davidg
30 * change all splnet's to splimp's
31 *
32 * Revision 2.13 1993/11/22 10:53:52 davidg
33 * patch to add support for SMC8216 (Elite-Ultra) boards
34 * from Glen H. Lowe
35 *
36 * Revision 2.12 1993/11/07 18:04:13 davidg
--- 143 unchanged lines hidden (view full) ---
180 u_char txb_next_tx; /* pointer to next buffer ready to xmit */
181 u_short txb_len[8]; /* buffered xmit buffer lengths */
182 u_char tx_page_start; /* first page of TX buffer area */
183 u_char rec_page_start; /* first page of RX ring-buffer */
184 u_char rec_page_stop; /* last page of RX ring-buffer */
185 u_char next_packet; /* pointer to next unread RX packet */
186} ed_softc[NED];
187
188int ed_attach(struct isa_device *);
189void ed_init(int);
190void edintr(int);
191int ed_ioctl(struct ifnet *, int, caddr_t);
192int ed_probe(struct isa_device *);
193void ed_start(struct ifnet *);
194void ed_reset(int, int);
195void ed_watchdog(int);
196static void ed_get_packet(struct ed_softc *, char *, int /*u_short*/);
197static void ed_stop(int);
198
199static inline void ed_rint();
200static inline void ed_xmit();
201static inline char *ed_ring_copy();
202
203void ed_pio_readmem(), ed_pio_writemem();
--- 169 unchanged lines hidden (view full) ---
373 memsize = 8192;
374 isa16bit = 0;
375 break;
376 case ED_TYPE_WD8013EBT:
377 sc->type_str = "WD8013EBT";
378 memsize = 16384;
379 isa16bit = 1;
380 break;
381 case ED_TYPE_WD8013EP: /* also WD8003EP */
382 if (inb(sc->asic_addr + ED_WD_ICR)
383 & ED_WD_ICR_16BIT) {
384 isa16bit = 1;
385 memsize = 16384;
386 sc->type_str = "WD8013EP";
387 } else {
388 isa16bit = 0;
--- 2102 unchanged lines hidden ---