Deleted Added
full compact
if_ie.c (50086) if_ie.c (50107)
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.64 1999/08/20 14:12:13 mdodd Exp $
50 * $Id: if_ie.c,v 1.65 1999/08/20 14:36:40 mdodd 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.

--- 126 unchanged lines hidden (view full) ---

185
186static void ee16_reset_586(int unit);
187static void ee16_chan_attn(int unit);
188static __inline void ee16_interrupt_enable(struct ie_softc * ie);
189static void ee16_eeprom_outbits(struct ie_softc * ie, int edata, int cnt);
190static void ee16_eeprom_clock(struct ie_softc * ie, int state);
191static u_short ee16_read_eeprom(struct ie_softc * ie, int location);
192static int ee16_eeprom_inbits(struct ie_softc * ie);
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.

--- 126 unchanged lines hidden (view full) ---

185
186static void ee16_reset_586(int unit);
187static void ee16_chan_attn(int unit);
188static __inline void ee16_interrupt_enable(struct ie_softc * ie);
189static void ee16_eeprom_outbits(struct ie_softc * ie, int edata, int cnt);
190static void ee16_eeprom_clock(struct ie_softc * ie, int state);
191static u_short ee16_read_eeprom(struct ie_softc * ie, int location);
192static int ee16_eeprom_inbits(struct ie_softc * ie);
193static void ee16_shutdown(int howto, void *sc);
193static void ee16_shutdown(void *sc, int howto);
194
195static void iereset(int unit);
196static void ie_readframe(int unit, struct ie_softc * ie, int bufno);
197static void ie_drop_packet_buffer(int unit, struct ie_softc * ie);
198static void sl_read_ether(int unit, unsigned char addr[6]);
199static void find_ie_mem_size(int unit);
200static void chan_attn_timeout(void *rock);
201static int command_and_wait(int unit, int command,

--- 343 unchanged lines hidden (view full) ---

545 sl_read_ether(unit, ie_softc[unit].arpcom.ac_enaddr);
546
547 return (8);
548
549}
550
551
552static void
194
195static void iereset(int unit);
196static void ie_readframe(int unit, struct ie_softc * ie, int bufno);
197static void ie_drop_packet_buffer(int unit, struct ie_softc * ie);
198static void sl_read_ether(int unit, unsigned char addr[6]);
199static void find_ie_mem_size(int unit);
200static void chan_attn_timeout(void *rock);
201static int command_and_wait(int unit, int command,

--- 343 unchanged lines hidden (view full) ---

545 sl_read_ether(unit, ie_softc[unit].arpcom.ac_enaddr);
546
547 return (8);
548
549}
550
551
552static void
553ee16_shutdown(int howto, void *sc)
553ee16_shutdown(void *sc, int howto)
554{
555 struct ie_softc *ie = (struct ie_softc *)sc;
556 int unit = ie - &ie_softc[0];
557
558 ee16_reset_586(unit);
559 outb(PORT + IEE16_ECTRL, IEE16_RESET_ASIC);
560 outb(PORT + IEE16_ECTRL, 0);
561}

--- 265 unchanged lines hidden (view full) ---

827 ifp->if_start = iestart;
828 ifp->if_ioctl = ieioctl;
829 ifp->if_init = ieinit;
830 ifp->if_type = IFT_ETHER;
831 ifp->if_addrlen = 6;
832 ifp->if_hdrlen = 14;
833
834 if (ie->hard_type == IE_EE16)
554{
555 struct ie_softc *ie = (struct ie_softc *)sc;
556 int unit = ie - &ie_softc[0];
557
558 ee16_reset_586(unit);
559 outb(PORT + IEE16_ECTRL, IEE16_RESET_ASIC);
560 outb(PORT + IEE16_ECTRL, 0);
561}

--- 265 unchanged lines hidden (view full) ---

827 ifp->if_start = iestart;
828 ifp->if_ioctl = ieioctl;
829 ifp->if_init = ieinit;
830 ifp->if_type = IFT_ETHER;
831 ifp->if_addrlen = 6;
832 ifp->if_hdrlen = 14;
833
834 if (ie->hard_type == IE_EE16)
835 at_shutdown(ee16_shutdown, ie, SHUTDOWN_POST_SYNC);
835 EVENTHANDLER_REGISTER(shutdown_post_sync, ee16_shutdown,
836 ie, SHUTDOWN_PRI_DEFAULT);
836
837#if NBPF > 0
838 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
839#endif
840
841 if_attach(ifp);
842 ether_ifattach(ifp);
843 return (1);

--- 1509 unchanged lines hidden ---
837
838#if NBPF > 0
839 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
840#endif
841
842 if_attach(ifp);
843 ether_ifattach(ifp);
844 return (1);

--- 1509 unchanged lines hidden ---