summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-08-09 19:29:04 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-08-09 19:29:04 +0000
commit019885ead28372c8dd3fc2c48d34e4982c4c0199 (patch)
tree055298ef5ca03ce8f6e4ee7f0ce5095181ef3d24
parentbe1b01b308d2509f91cfb1eca9c42bab2acf13e6 (diff)
don't compile rss functions in unless OCE_RSS is specified
-rw-r--r--sys/dev/pci/if_oce.c4
-rw-r--r--sys/dev/pci/oce.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c
index 3305cf2f8c0..ac3b14ac91c 100644
--- a/sys/dev/pci/if_oce.c
+++ b/sys/dev/pci/if_oce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_oce.c,v 1.13 2012/08/09 19:23:35 mikeb Exp $ */
+/* $OpenBSD: if_oce.c,v 1.14 2012/08/09 19:29:03 mikeb Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
@@ -1482,6 +1482,7 @@ oce_init(void *arg)
DELAY(10);
+#ifdef OCE_RSS
/* RSS config */
if (sc->rss_enable) {
if (oce_config_nic_rss(sc, (uint8_t)sc->if_id, RSS_ENABLE)) {
@@ -1490,6 +1491,7 @@ oce_init(void *arg)
goto error;
}
}
+#endif
for_all_rq_queues(sc, rq, i)
oce_arm_cq(rq->parent, rq->cq->cq_id, 0, TRUE);
diff --git a/sys/dev/pci/oce.c b/sys/dev/pci/oce.c
index 3b88ee45dc3..7abd4e31aaa 100644
--- a/sys/dev/pci/oce.c
+++ b/sys/dev/pci/oce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oce.c,v 1.4 2012/08/09 19:19:49 mikeb Exp $ */
+/* $OpenBSD: oce.c,v 1.5 2012/08/09 19:29:03 mikeb Exp $ */
/*-
* Copyright (C) 2012 Emulex
@@ -1041,6 +1041,7 @@ oce_set_flow_control(struct oce_softc *sc, uint32_t flow_control)
return rc;
}
+#ifdef OCE_RSS
/**
* @brief Initialize the RSS CPU indirection table
*
@@ -1128,6 +1129,7 @@ oce_config_nic_rss(struct oce_softc *sc, uint32_t if_id, uint16_t enable_rss)
return rc;
}
+#endif /* OCE_RSS */
/**
* @brief RXF function to enable/disable device promiscuous mode