summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2013-09-12 21:03:11 +0000
committermartin <martin@NetBSD.org>2013-09-12 21:03:11 +0000
commit3bbea2fbb39809949cf9b791a0e162f9db897cfd (patch)
treea897ba20032813c4a72dd8e2f81a8c427be5201a /sys/dev/usb
parent1b38020b8f4ce35a7a6e491fefff26c931c5b117 (diff)
#ifdef some variables just like their use
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_axe.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 29fa22ce5e0..9609b9fa366 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.64 2013/01/22 12:40:42 jmcneill Exp $ */
+/* $NetBSD: if_axe.c,v 1.65 2013/09/12 21:03:11 martin Exp $ */
/* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
/*
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.64 2013/01/22 12:40:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.65 2013/09/12 21:03:11 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -464,7 +464,9 @@ axe_reset(struct axe_softc *sc)
static void
axe_ax88178_init(struct axe_softc *sc)
{
+#ifdef AXE_DEBUG
int gpio0 = 0, phymode = 0;
+#endif
uint16_t eeprom;
axe_cmd(sc, AXE_CMD_SROM_WR_ENABLE, 0, 0, NULL);
@@ -477,6 +479,7 @@ axe_ax88178_init(struct axe_softc *sc)
DPRINTF((" EEPROM is 0x%x\n", eeprom));
/* if EEPROM is invalid we have to use to GPIO0 */
+#ifdef AXE_DEBUG
if (eeprom == 0xffff) {
phymode = 0;
gpio0 = 1;
@@ -484,6 +487,7 @@ axe_ax88178_init(struct axe_softc *sc)
phymode = eeprom & 7;
gpio0 = (eeprom & 0x80) ? 0 : 1;
}
+#endif
DPRINTF(("use gpio0: %d, phymode %d\n", gpio0, phymode));