if_pcn.c (199560) | if_pcn.c (213893) |
---|---|
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 199560 2009-11-19 22:14:23Z jhb $"); | 35__FBSDID("$FreeBSD: head/sys/dev/pcn/if_pcn.c 213893 2010-10-15 14:52:11Z 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. | 637 * Do MII setup. Note that loopback support isn't implemented. 638 * See the comment in pcn_miibus_readreg() for why we can't 639 * universally pass MIIF_NOISOLATE here. |
638 */ 639 sc->pcn_extphyaddr = -1; | 640 */ 641 sc->pcn_extphyaddr = -1; |
640 if (mii_phy_probe(dev, &sc->pcn_miibus, 641 pcn_ifmedia_upd, pcn_ifmedia_sts)) { 642 device_printf(dev, "MII without any PHY!\n"); 643 error = ENXIO; | 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); 645 if (error != 0) { 646 device_printf(dev, "attaching PHYs failed\n"); |
644 goto fail; 645 } 646 /* 647 * Record the media instances of internal PHYs, which map the 648 * built-in interfaces to the MII, so we can set the active 649 * PHY/port based on the currently selected media. 650 */ 651 sc->pcn_inst_10bt = -1; --- 869 unchanged lines hidden --- | 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. 653 */ 654 sc->pcn_inst_10bt = -1; --- 869 unchanged lines hidden --- |