Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Simplify. No functional change.
details: https://anonhg.NetBSD.org/src/rev/1c416bbe0ae6
branches: trunk
changeset: 465799:1c416bbe0ae6
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Dec 04 09:03:45 2019 +0000
description:
Simplify. No functional change.
diffstat:
sys/dev/pci/if_wm.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (73 lines):
diff -r b398e8bf8a95 -r 1c416bbe0ae6 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed Dec 04 09:03:34 2019 +0000
+++ b/sys/dev/pci/if_wm.c Wed Dec 04 09:03:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -9284,7 +9284,7 @@
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
struct mii_data *mii = &sc->sc_mii;
- struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
+ struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
uint32_t pcs_adv, pcs_lpab, reg;
DPRINTF(WM_DEBUG_LINK, ("%s: %s:\n", device_xname(sc->sc_dev),
@@ -11409,7 +11409,7 @@
sc->sc_ctrl |= CTRL_RFCE;
}
- if (sc->sc_mii.mii_media_active & IFM_FDX) {
+ if (mii->mii_media_active & IFM_FDX) {
DPRINTF(WM_DEBUG_LINK,
("%s: LINK: statchg: FDX\n", ifp->if_xname));
sc->sc_tctl |= TCTL_COLD(TX_COLLISION_DISTANCE_FDX);
@@ -11424,7 +11424,7 @@
CSR_WRITE(sc, (sc->sc_type < WM_T_82543) ? WMREG_OLD_FCRTL
: WMREG_FCRTL, sc->sc_fcrtl);
if (sc->sc_type == WM_T_80003) {
- switch (IFM_SUBTYPE(sc->sc_mii.mii_media_active)) {
+ switch (IFM_SUBTYPE(mii->mii_media_active)) {
case IFM_1000_T:
wm_kmrn_writereg(sc, KUMCTRLSTA_OFFSET_HD_CTRL,
KUMCTRLSTA_HD_CTRL_1000_DEFAULT);
@@ -12190,7 +12190,7 @@
{
struct wm_softc *sc = ifp->if_softc;
struct mii_data *mii = &sc->sc_mii;
- struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
+ struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
uint32_t pcs_adv, pcs_lpab, reg;
ifmr->ifm_status = IFM_AVALID;
@@ -15459,7 +15459,7 @@
if ((rv = wm_set_mdio_slow_mode_hv(sc)) != 0)
return rv;
- child = LIST_FIRST(&sc->sc_mii.mii_phys);
+ child = LIST_FIRST(&mii->mii_phys);
if (child != NULL)
phyrev = child->mii_mpd_rev;
@@ -15494,8 +15494,7 @@
*/
if ((child != NULL) && (phyrev < 2)) {
PHY_RESET(child);
- rv = sc->sc_mii.mii_writereg(dev, 2, MII_BMCR,
- 0x3140);
+ rv = mii->mii_writereg(dev, 2, MII_BMCR, 0x3140);
if (rv != 0)
return rv;
}
Home |
Main Index |
Thread Index |
Old Index