Pass MIIF_DOPAUSE mask to mii_attach() in if_emac.c. emac(4) change a

register from IFM_FLOW flag, so this change is required to control the
setting via ifconfig. PR#48950. OK'd by matt@.
This commit is contained in:
msaitoh 2014-06-26 07:50:29 +00:00
parent fedb6c32b4
commit af7b229d67
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_emac.c,v 1.41 2012/07/22 14:32:52 matt Exp $ */ /* $NetBSD: if_emac.c,v 1.42 2014/06/26 07:50:29 msaitoh Exp $ */
/* /*
* Copyright 2001, 2002 Wasabi Systems, Inc. * Copyright 2001, 2002 Wasabi Systems, Inc.
@ -52,7 +52,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.41 2012/07/22 14:32:52 matt Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.42 2014/06/26 07:50:29 msaitoh Exp $");
#include "opt_emac.h" #include "opt_emac.h"
@ -522,7 +522,8 @@ emac_attach(device_t parent, device_t self, void *aux)
sc->sc_ethercom.ec_mii = mii; sc->sc_ethercom.ec_mii = mii;
ifmedia_init(&mii->mii_media, 0, ether_mediachange, ether_mediastatus); ifmedia_init(&mii->mii_media, 0, ether_mediachange, ether_mediastatus);
mii_attach(self, mii, 0xffffffff, mii_phy, MII_OFFSET_ANY, 0); mii_attach(self, mii, 0xffffffff, mii_phy, MII_OFFSET_ANY,
MIIF_DOPAUSE);
if (LIST_FIRST(&mii->mii_phys) == NULL) { if (LIST_FIRST(&mii->mii_phys) == NULL) {
ifmedia_add(&mii->mii_media, IFM_ETHER|IFM_NONE, 0, NULL); ifmedia_add(&mii->mii_media, IFM_ETHER|IFM_NONE, 0, NULL);
ifmedia_set(&mii->mii_media, IFM_ETHER|IFM_NONE); ifmedia_set(&mii->mii_media, IFM_ETHER|IFM_NONE);