From 3d92bf7df0aac662366c9f6ea45973f6c484c920 Mon Sep 17 00:00:00 2001 From: jym Date: Thu, 22 Sep 2011 08:42:53 +0000 Subject: [PATCH] The bnx(4) handler runs at IPL_NET (works with spin mutexes), while allocations can be deferred to a workqueue(9): set its highest IPL to IPL_NET and not IPL_NONE, which is protected by an adaptive/sleeping mutex. --- sys/dev/pci/if_bnx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 7b7f3155daef..7ee5905d0765 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.44 2011/07/15 11:29:31 jym Exp $ */ +/* $NetBSD: if_bnx.c,v 1.45 2011/09/22 08:42:53 jym Exp $ */ /* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.44 2011/07/15 11:29:31 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.45 2011/09/22 08:42:53 jym Exp $"); /* * The following controllers are supported by this driver: @@ -707,7 +707,7 @@ bnx_attach(device_t parent, device_t self, void *aux) /* create workqueue to handle packet allocations */ if (workqueue_create(&sc->bnx_wq, device_xname(self), - bnx_alloc_pkts, sc, PRI_NONE, IPL_NONE, WQ_MPSAFE) != 0) { + bnx_alloc_pkts, sc, PRI_NONE, IPL_NET, WQ_MPSAFE) != 0) { aprint_error_dev(self, "failed to create workqueue\n"); goto bnx_attach_fail; }