Fetch negotiated flow control parameters. From HITOSHI Osada.

This commit is contained in:
thorpej 2004-04-10 18:47:56 +00:00
parent f852e1c1e4
commit 84694bb5fa
6 changed files with 24 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: brgphy.c,v 1.18 2003/07/17 11:44:26 hannken Exp $ */
/* $NetBSD: brgphy.c,v 1.19 2004/04/10 18:47:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.18 2003/07/17 11:44:26 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.19 2004/04/10 18:47:56 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -403,6 +403,8 @@ brgphy_status(struct mii_softc *sc)
mii->mii_media_active |= IFM_NONE;
mii->mii_media_status = 0;
}
if (mii->mii_media_active & IFM_FDX)
mii->mii_media_active |= gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gentbi.c,v 1.10 2003/04/29 01:49:33 thorpej Exp $ */
/* $NetBSD: gentbi.c,v 1.11 2004/04/10 18:47:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.10 2003/04/29 01:49:33 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.11 2004/04/10 18:47:56 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -278,7 +278,8 @@ gentbi_status(struct mii_softc *sc)
anlpar = PHY_READ(sc, MII_ANLPAR);
if ((sc->mii_extcapabilities & EXTSR_1000XFDX) != 0 &&
(anlpar & ANLPAR_X_FD) != 0)
mii->mii_media_active |= IFM_FDX;
mii->mii_media_active |=
IFM_FDX | gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: glxtphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $ */
/* $NetBSD: glxtphy.c,v 1.10 2004/04/10 18:47:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.10 2004/04/10 18:47:56 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -273,7 +273,8 @@ glxtphy_status(struct mii_softc *sc)
}
if (qsr & QSR_DUPLEX)
mii->mii_media_active |= IFM_FDX;
mii->mii_media_active |=
IFM_FDX | gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gphyter.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $ */
/* $NetBSD: gphyter.c,v 1.13 2004/04/10 18:47:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.13 2004/04/10 18:47:56 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -302,7 +302,8 @@ gphyter_status(struct mii_softc *sc)
mii->mii_media_status = 0;
}
if (physup & PHY_SUP_DUPLEX)
mii->mii_media_active |= IFM_FDX;
mii->mii_media_active |=
IFM_FDX | gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: igphy.c,v 1.1 2003/10/28 00:15:40 fvdl Exp $ */
/* $NetBSD: igphy.c,v 1.2 2004/04/10 18:47:56 thorpej Exp $ */
/*
* The Intel copyright applies to the analog register setup, and the
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.1 2003/10/28 00:15:40 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.2 2004/04/10 18:47:56 thorpej Exp $");
#include "opt_mii.h"
@ -359,7 +359,8 @@ igphy_status(struct mii_softc *sc)
}
if (pssr & PSSR_FULL_DUPLEX)
mii->mii_media_active |= IFM_FDX;
mii->mii_media_active |=
IFM_FDX | gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: makphy.c,v 1.12 2003/04/29 01:49:34 thorpej Exp $ */
/* $NetBSD: makphy.c,v 1.13 2004/04/10 18:47:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.12 2003/04/29 01:49:34 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.13 2004/04/10 18:47:56 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -280,7 +280,8 @@ makphy_status(struct mii_softc *sc)
}
if (pssr & PSSR_DUPLEX)
mii->mii_media_active |= IFM_FDX;
mii->mii_media_active |=
IFM_FDX | gmii_phy_getflowcontrol(sc);
} else
mii->mii_media_active = ife->ifm_media;
}