Deleted Added
full compact
if_pcn.c (213893) if_pcn.c (221407)
1/*-
2 * Copyright (c) 2000 Berkeley Software Design, Inc.
3 * Copyright (c) 1997, 1998, 1999, 2000
4 * Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Berkeley Software Design, Inc.
3 * Copyright (c) 1997, 1998, 1999, 2000
4 * Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/dev/pcn/if_pcn.c 213893 2010-10-15 14:52:11Z marius $");
35__FBSDID("$FreeBSD: head/sys/dev/pcn/if_pcn.c 221407 2011-05-03 19:51:29Z marius $");
36
37/*
38 * AMD Am79c972 fast ethernet PCI NIC driver. Datasheets are available
39 * from http://www.amd.com.
40 *
41 * The AMD PCnet/PCI controllers are more advanced and functional
42 * versions of the venerable 7990 LANCE. The PCnet/PCI chips retain
43 * backwards compatibility with the LANCE and thus can be made

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

629 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
630 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
631 ifp->if_ioctl = pcn_ioctl;
632 ifp->if_start = pcn_start;
633 ifp->if_init = pcn_init;
634 ifp->if_snd.ifq_maxlen = PCN_TX_LIST_CNT - 1;
635
636 /*
36
37/*
38 * AMD Am79c972 fast ethernet PCI NIC driver. Datasheets are available
39 * from http://www.amd.com.
40 *
41 * The AMD PCnet/PCI controllers are more advanced and functional
42 * versions of the venerable 7990 LANCE. The PCnet/PCI chips retain
43 * backwards compatibility with the LANCE and thus can be made

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

629 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
630 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
631 ifp->if_ioctl = pcn_ioctl;
632 ifp->if_start = pcn_start;
633 ifp->if_init = pcn_init;
634 ifp->if_snd.ifq_maxlen = PCN_TX_LIST_CNT - 1;
635
636 /*
637 * Do MII setup. Note that loopback support isn't implemented.
637 * Do MII setup.
638 * See the comment in pcn_miibus_readreg() for why we can't
639 * universally pass MIIF_NOISOLATE here.
640 */
641 sc->pcn_extphyaddr = -1;
642 error = mii_attach(dev, &sc->pcn_miibus, ifp, pcn_ifmedia_upd,
638 * See the comment in pcn_miibus_readreg() for why we can't
639 * universally pass MIIF_NOISOLATE here.
640 */
641 sc->pcn_extphyaddr = -1;
642 error = mii_attach(dev, &sc->pcn_miibus, ifp, pcn_ifmedia_upd,
643 pcn_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY,
644 MIIF_NOLOOP);
643 pcn_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
645 if (error != 0) {
646 device_printf(dev, "attaching PHYs failed\n");
647 goto fail;
648 }
649 /*
650 * Record the media instances of internal PHYs, which map the
651 * built-in interfaces to the MII, so we can set the active
652 * PHY/port based on the currently selected media.

--- 871 unchanged lines hidden ---
644 if (error != 0) {
645 device_printf(dev, "attaching PHYs failed\n");
646 goto fail;
647 }
648 /*
649 * Record the media instances of internal PHYs, which map the
650 * built-in interfaces to the MII, so we can set the active
651 * PHY/port based on the currently selected media.

--- 871 unchanged lines hidden ---