Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Fix build after API change
details: https://anonhg.NetBSD.org/src/rev/7531594b9b1b
branches: trunk
changeset: 447740:7531594b9b1b
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jan 22 17:41:06 2019 +0000
description:
Fix build after API change
diffstat:
sys/dev/mii/micphy.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (64 lines):
diff -r 9d96b90e3e60 -r 7531594b9b1b sys/dev/mii/micphy.c
--- a/sys/dev/mii/micphy.c Tue Jan 22 16:36:07 2019 +0000
+++ b/sys/dev/mii/micphy.c Tue Jan 22 17:41:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $ */
+/* $NetBSD: micphy.c,v 1.5 2019/01/22 17:41:06 skrll Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.5 2019/01/22 17:41:06 skrll Exp $");
#include "opt_mii.h"
@@ -136,9 +136,10 @@
micphy_fixup(sc, model, rev, parent);
- sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
+ PHY_READ(sc, MII_BMSR, &sc->mii_capabilities);
+ sc->mii_capabilities &= ma->mii_capmask;
if (sc->mii_capabilities & BMSR_EXTSTAT)
- sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
+ PHY_READ(sc, MII_EXTSR, &sc->mii_extcapabilities);
aprint_normal_dev(self, "");
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
@@ -152,7 +153,7 @@
micphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
{
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
+ uint16_t reg;
switch (cmd) {
case MII_POLLSTAT:
@@ -169,7 +170,7 @@
* isolate ourselves.
*/
if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- reg = PHY_READ(sc, MII_BMCR);
+ PHY_READ(sc, MII_BMCR, ®);
PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
return 0;
}
@@ -218,12 +219,12 @@
static void micphy_writexreg(struct mii_softc *sc, uint32_t reg, uint32_t wval)
{
- int rval __debugused;
+ uint16_t rval __debugused;
PHY_WRITE(sc, XREG_CONTROL, XREG_CTL_SEL_WRITE | reg);
PHY_WRITE(sc, XREG_WRITE, wval);
PHY_WRITE(sc, XREG_CONTROL, XREG_CTL_SEL_READ | reg);
- rval = PHY_READ(sc, XREG_READ);
+ PHY_READ(sc, XREG_READ, &rval);
KDASSERT(wval == rval);
}
Home |
Main Index |
Thread Index |
Old Index