aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2018-04-04 22:52:24 +0000
committerNavdeep Parhar <np@FreeBSD.org>2018-04-04 22:52:24 +0000
commitde93353248b537de39bb47306402ebe93d54f348 (patch)
tree430aedc460e836b5695d2800cc1cf9eae40e4b31 /sys
parent62d6bc395ae65757780d00b98561708072b0d70d (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cxgbe/t4_main.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 34f842a775d5c..9fa4e9efc20c7 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -1636,8 +1636,13 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data)
redo_sifflags:
rc = begin_synchronized_op(sc, vi,
can_sleep ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4flg");
- if (rc)
+ if (rc) {
+ if_printf(ifp, "%ssleepable synch operation failed: %d."
+ " if_flags 0x%08x, if_drv_flags 0x%08x\n",
+ can_sleep ? "" : "non-", rc, ifp->if_flags,
+ ifp->if_drv_flags);
return (rc);
+ }
if (ifp->if_flags & IFF_UP) {
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
@@ -4306,8 +4311,13 @@ cxgbe_uninit_synchronized(struct vi_info *vi)
ASSERT_SYNCHRONIZED_OP(sc);
if (!(vi->flags & VI_INIT_DONE)) {
- KASSERT(!(ifp->if_drv_flags & IFF_DRV_RUNNING),
- ("uninited VI is running"));
+ if (__predict_false(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+ KASSERT(0, ("uninited VI is running"));
+ if_printf(ifp, "uninited VI with running ifnet. "
+ "vi->flags 0x%016lx, if_flags 0x%08x, "
+ "if_drv_flags 0x%08x\n", vi->flags, ifp->if_flags,
+ ifp->if_drv_flags);
+ }
return (0);
}