Deleted Added
full compact
if_xl.c (71962) if_xl.c (72084)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/pci/if_xl.c 71962 2001-02-03 16:29:10Z phk $
32 * $FreeBSD: head/sys/pci/if_xl.c 72084 2001-02-06 10:12:15Z phk $
33 */
34
35/*
36 * 3Com 3c90x Etherlink XL PCI NIC driver
37 *
38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI
39 * bus-master chips (3c90x cards and embedded controllers) including
40 * the following:

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

145 * might not work on some devices.
146 */
147#define XL_USEIOSPACE
148
149#include <pci/if_xlreg.h>
150
151#if !defined(lint)
152static const char rcsid[] =
33 */
34
35/*
36 * 3Com 3c90x Etherlink XL PCI NIC driver
37 *
38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI
39 * bus-master chips (3c90x cards and embedded controllers) including
40 * the following:

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

145 * might not work on some devices.
146 */
147#define XL_USEIOSPACE
148
149#include <pci/if_xlreg.h>
150
151#if !defined(lint)
152static const char rcsid[] =
153 "$FreeBSD: head/sys/pci/if_xl.c 71962 2001-02-03 16:29:10Z phk $";
153 "$FreeBSD: head/sys/pci/if_xl.c 72084 2001-02-06 10:12:15Z phk $";
154#endif
155
156/*
157 * Various supported device vendors/types and their names.
158 */
159static struct xl_type xl_devs[] = {
160 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT,
161 "3Com 3c900-TPO Etherlink XL" },

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

803 rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER);
804
805 if (ifp->if_flags & IFF_ALLMULTI) {
806 rxfilt |= XL_RXFILTER_ALLMULTI;
807 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt);
808 return;
809 }
810
154#endif
155
156/*
157 * Various supported device vendors/types and their names.
158 */
159static struct xl_type xl_devs[] = {
160 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT,
161 "3Com 3c900-TPO Etherlink XL" },

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

803 rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER);
804
805 if (ifp->if_flags & IFF_ALLMULTI) {
806 rxfilt |= XL_RXFILTER_ALLMULTI;
807 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt);
808 return;
809 }
810
811 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
811 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
812 mcnt++;
813
814 if (mcnt)
815 rxfilt |= XL_RXFILTER_ALLMULTI;
816 else
817 rxfilt &= ~XL_RXFILTER_ALLMULTI;
818
819 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt);

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

846 rxfilt &= ~XL_RXFILTER_ALLMULTI;
847
848
849 /* first, zot all the existing hash bits */
850 for (i = 0; i < XL_HASHFILT_SIZE; i++)
851 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|i);
852
853 /* now program new ones */
812 mcnt++;
813
814 if (mcnt)
815 rxfilt |= XL_RXFILTER_ALLMULTI;
816 else
817 rxfilt &= ~XL_RXFILTER_ALLMULTI;
818
819 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt);

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

846 rxfilt &= ~XL_RXFILTER_ALLMULTI;
847
848
849 /* first, zot all the existing hash bits */
850 for (i = 0; i < XL_HASHFILT_SIZE; i++)
851 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|i);
852
853 /* now program new ones */
854 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
854 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
855 if (ifma->ifma_addr->sa_family != AF_LINK)
856 continue;
857 h = xl_calchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
858 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|XL_HASH_SET|h);
859 mcnt++;
860 }
861
862 if (mcnt)

--- 2136 unchanged lines hidden ---
855 if (ifma->ifma_addr->sa_family != AF_LINK)
856 continue;
857 h = xl_calchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
858 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|XL_HASH_SET|h);
859 mcnt++;
860 }
861
862 if (mcnt)

--- 2136 unchanged lines hidden ---