mii_physubr.c (164702) | mii_physubr.c (164703) |
---|---|
1/* $NetBSD: mii_physubr.c,v 1.5 1999/08/03 19:41:49 drochner Exp $ */ 2 3/*- 4 * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 24 unchanged lines hidden (view full) --- 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 */ 39 40#include <sys/cdefs.h> | 1/* $NetBSD: mii_physubr.c,v 1.5 1999/08/03 19:41:49 drochner Exp $ */ 2 3/*- 4 * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 24 unchanged lines hidden (view full) --- 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/mii/mii_physubr.c 164702 2006-11-27 23:37:59Z marius $"); | 41__FBSDID("$FreeBSD: head/sys/dev/mii/mii_physubr.c 164703 2006-11-27 23:50:19Z marius $"); |
42 43/* 44 * Subroutines common to all PHYs. 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/kernel.h> --- 362 unchanged lines hidden (view full) --- 412 * of media names. Does not print a newline. 413 */ 414void 415mii_phy_add_media(struct mii_softc *sc) 416{ 417 struct mii_data *mii = sc->mii_pdata; 418 const char *sep = ""; 419 | 42 43/* 44 * Subroutines common to all PHYs. 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/kernel.h> --- 362 unchanged lines hidden (view full) --- 412 * of media names. Does not print a newline. 413 */ 414void 415mii_phy_add_media(struct mii_softc *sc) 416{ 417 struct mii_data *mii = sc->mii_pdata; 418 const char *sep = ""; 419 |
420 if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && 421 (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) { 422 printf("no media present"); 423 return; 424 } 425 |
|
420 /* Set aneg timer for 10/100 media. Gigabit media handled below. */ 421 sc->mii_anegticks = MII_ANEGTICKS; 422 423#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) 424#define PRINT(s) printf("%s%s", sep, s); sep = ", " 425 426 if ((sc->mii_flags & MIIF_NOISOLATE) == 0) 427 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), --- 131 unchanged lines hidden --- | 426 /* Set aneg timer for 10/100 media. Gigabit media handled below. */ 427 sc->mii_anegticks = MII_ANEGTICKS; 428 429#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) 430#define PRINT(s) printf("%s%s", sep, s); sep = ", " 431 432 if ((sc->mii_flags & MIIF_NOISOLATE) == 0) 433 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), --- 131 unchanged lines hidden --- |