Deleted Added
full compact
if_ep.c (30753) if_ep.c (31016)
1/*
2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca>
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

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

33/*
34 * Modified from the FreeBSD 1.1.5.1 version by:
35 * Andres Vega Garcia
36 * INRIA - Sophia Antipolis, France
37 * avega@sophia.inria.fr
38 */
39
40/*
1/*
2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca>
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

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

33/*
34 * Modified from the FreeBSD 1.1.5.1 version by:
35 * Andres Vega Garcia
36 * INRIA - Sophia Antipolis, France
37 * avega@sophia.inria.fr
38 */
39
40/*
41 * $Id: if_ep.c,v 1.64 1997/10/26 21:08:40 nate Exp $
41 * $Id: if_ep.c,v 1.65 1997/10/27 00:02:33 fenner Exp $
42 *
43 * Promiscuous mode added and interrupt logic slightly changed
44 * to reduce the number of adapter failures. Transceiver select
45 * logic changed to use value from EEPROM. Autoconfiguration
46 * features added.
47 * Done by:
48 * Serge Babkin
49 * Chelindbank (Chelyabinsk, Russia)

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

563 ep_attach(sc);
564 return 1;
565}
566
567int
568ep_attach(sc)
569 struct ep_softc *sc;
570{
42 *
43 * Promiscuous mode added and interrupt logic slightly changed
44 * to reduce the number of adapter failures. Transceiver select
45 * logic changed to use value from EEPROM. Autoconfiguration
46 * features added.
47 * Done by:
48 * Serge Babkin
49 * Chelindbank (Chelyabinsk, Russia)

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

563 ep_attach(sc);
564 return 1;
565}
566
567int
568ep_attach(sc)
569 struct ep_softc *sc;
570{
571 struct ifaddr *ifa;
572 struct ifnet *ifp = &sc->arpcom.ac_if;
571 struct ifnet *ifp = &sc->arpcom.ac_if;
573 struct sockaddr_dl *sdl;
574 u_short *p;
575 int i;
576 int attached;
577
578 sc->gone = 0;
579 attached = (ifp->if_softc != 0);
580
581 printf("ep%d: ", sc->unit);

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

1027 register struct ep_softc *sc;
1028{
1029 struct ether_header *eh;
1030 struct mbuf *top, *mcur, *m;
1031 struct ifnet *ifp;
1032 int lenthisone;
1033
1034 short rx_fifo2, status;
572 u_short *p;
573 int i;
574 int attached;
575
576 sc->gone = 0;
577 attached = (ifp->if_softc != 0);
578
579 printf("ep%d: ", sc->unit);

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

1025 register struct ep_softc *sc;
1026{
1027 struct ether_header *eh;
1028 struct mbuf *top, *mcur, *m;
1029 struct ifnet *ifp;
1030 int lenthisone;
1031
1032 short rx_fifo2, status;
1035 register short delta;
1036 register short rx_fifo;
1037
1038 ifp = &sc->arpcom.ac_if;
1039 status = inw(BASE + EP_W1_RX_STATUS);
1040
1041read_again:
1042
1043 if (status & ERR_RX) {

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

1124 ep_frst(F_RX_FIRST);
1125 if (!((status = inw(BASE + EP_W1_RX_STATUS)) & ERR_RX_INCOMPLETE)) {
1126 /* we see if by now, the packet has completly arrived */
1127 goto read_again;
1128 }
1129 outw(BASE + EP_COMMAND, SET_RX_EARLY_THRESH | RX_NEXT_EARLY_THRESH);
1130 return;
1131 }
1033 register short rx_fifo;
1034
1035 ifp = &sc->arpcom.ac_if;
1036 status = inw(BASE + EP_W1_RX_STATUS);
1037
1038read_again:
1039
1040 if (status & ERR_RX) {

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

1121 ep_frst(F_RX_FIRST);
1122 if (!((status = inw(BASE + EP_W1_RX_STATUS)) & ERR_RX_INCOMPLETE)) {
1123 /* we see if by now, the packet has completly arrived */
1124 goto read_again;
1125 }
1126 outw(BASE + EP_COMMAND, SET_RX_EARLY_THRESH | RX_NEXT_EARLY_THRESH);
1127 return;
1128 }
1132all_pkt:
1133 outw(BASE + EP_COMMAND, RX_DISCARD_TOP_PACK);
1134 ++ifp->if_ipackets;
1135 ep_fset(F_RX_FIRST);
1136 top->m_pkthdr.rcvif = &sc->arpcom.ac_if;
1137 top->m_pkthdr.len = sc->cur_len;
1138
1139#if NBPFILTER > 0
1140 if (ifp->if_bpf) {

--- 270 unchanged lines hidden ---
1129 outw(BASE + EP_COMMAND, RX_DISCARD_TOP_PACK);
1130 ++ifp->if_ipackets;
1131 ep_fset(F_RX_FIRST);
1132 top->m_pkthdr.rcvif = &sc->arpcom.ac_if;
1133 top->m_pkthdr.len = sc->cur_len;
1134
1135#if NBPFILTER > 0
1136 if (ifp->if_bpf) {

--- 270 unchanged lines hidden ---