summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-08-04 09:45:10 +0000
committerhselasky <hselasky@FreeBSD.org>2015-08-04 09:45:10 +0000
commit8375b98de4c421f80c369722ba6bed7ea63aab2f (patch)
treeb8c5452b63bfe1a9b80a01d46a1302931a3bf47b /sys/ofed
parentb8165ab6a9cf903e39418903598efa0909a6ce46 (diff)
downloadFreeBSD-src-8375b98de4c421f80c369722ba6bed7ea63aab2f.zip
FreeBSD-src-8375b98de4c421f80c369722ba6bed7ea63aab2f.tar.gz
Avoid calling into the random subsystem before it is initialized.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/net/mlx4/en_tx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_tx.c b/sys/ofed/drivers/net/mlx4/en_tx.c
index 2d7e8a8..2565f51 100644
--- a/sys/ofed/drivers/net/mlx4/en_tx.c
+++ b/sys/ofed/drivers/net/mlx4/en_tx.c
@@ -701,9 +701,13 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, struct mbuf *mb,
static uint32_t hashrandom;
static void hashrandom_init(void *arg)
{
+ /*
+ * It is assumed that the random subsystem has been
+ * initialized when this function is called:
+ */
hashrandom = m_ether_tcpip_hash_init();
}
-SYSINIT(hashrandom_init, SI_SUB_KLD, SI_ORDER_SECOND, &hashrandom_init, NULL);
+SYSINIT(hashrandom_init, SI_SUB_RANDOM, SI_ORDER_ANY, &hashrandom_init, NULL);
u16 mlx4_en_select_queue(struct net_device *dev, struct mbuf *mb)
{
OpenPOWER on IntegriCloud