Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Only tick mii if the phy had a status change.
details: https://anonhg.NetBSD.org/src/rev/fc5f46f040fc
branches: trunk
changeset: 749990:fc5f46f040fc
user: matt <matt%NetBSD.org@localhost>
date: Mon Dec 14 00:52:04 2009 +0000
description:
Only tick mii if the phy had a status change.
diffstat:
sys/dev/pci/if_msk.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 9c1e52533f96 -r fc5f46f040fc sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c Mon Dec 14 00:51:06 2009 +0000
+++ b/sys/dev/pci/if_msk.c Mon Dec 14 00:52:04 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $ */
+/* $NetBSD: if_msk.c,v 1.29 2009/12/14 00:52:04 matt Exp $ */
/* $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
/*
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.29 2009/12/14 00:52:04 matt Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -1219,8 +1219,9 @@
case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
if (pci_mapreg_map(pa, SK_PCI_LOMEM,
memtype, 0, &sc->sk_btag, &sc->sk_bhandle,
- NULL, &size) == 0)
+ NULL, &size) == 0) {
break;
+ }
default:
aprint_error(": can't map mem space\n");
return;
@@ -1821,10 +1822,15 @@
{
struct sk_if_softc *sc_if = xsc_if;
struct mii_data *mii = &sc_if->sk_mii;
+ uint16_t gpsr;
int s;
s = splnet();
- mii_tick(mii);
+ gpsr = SK_YU_READ_2(sc_if, YUKON_GPSR);
+ if ((gpsr & YU_GPSR_MII_PHY_STC) != 0) {
+ SK_YU_WRITE_2(sc_if, YUKON_GPSR, YU_GPSR_MII_PHY_STC);
+ mii_tick(mii);
+ }
splx(s);
callout_schedule(&sc_if->sk_tick_ch, hz);
Home |
Main Index |
Thread Index |
Old Index