summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2006-04-17 10:11:29 +0000
committerbrad <brad@openbsd.org>2006-04-17 10:11:29 +0000
commit8c615b1a4e355c71e99f8c3fe39c30b5564bfb4c (patch)
tree4d8ed020f7214245a191ab6501dc732272113323
parentThree undocumented options got lost in the conversion to getopt(3). (diff)
downloadwireguard-openbsd-8c615b1a4e355c71e99f8c3fe39c30b5564bfb4c.tar.xz
wireguard-openbsd-8c615b1a4e355c71e99f8c3fe39c30b5564bfb4c.zip
If there is a timeout while writing to the PHY in
sk_marv_miibus_writereg() then print a message indicating so, as done in the XMAC case.
-rw-r--r--sys/dev/pci/if_sk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index cb00c98c8e7..80e5ee6367c 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.97 2006/04/17 04:45:02 brad Exp $ */
+/* $OpenBSD: if_sk.c,v 1.98 2006/04/17 10:11:29 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -423,6 +423,9 @@ sk_marv_miibus_writereg(dev, phy, reg, val)
if (SK_YU_READ_2(sc_if, YUKON_SMICR) & YU_SMICR_BUSY)
break;
}
+
+ if (i == SK_TIMEOUT)
+ printf("%s: phy write timed out\n", sc_if->sk_dev.dv_xname);
}
void