From 94f9f4e0ad0df32c0683c48fbf4c6fad598a94d2 Mon Sep 17 00:00:00 2001 From: sbruno Date: Thu, 7 Jul 2016 03:39:18 +0000 Subject: [PATCH] Do not initialize the adapter on MTU change when adapter status is down. This fixes long-standing problems when changing settings of the adapter. Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html Submitted by: arnaud.ysmal@stormshield.eu Reviewed by: erj@freebsd.org Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7030 --- sys/dev/ixl/ixl_pf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 08b3b94bbc9..6a96b860db4 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -5293,7 +5293,8 @@ ixl_ioctl(struct ifnet * ifp, u_long command, caddr_t data) vsi->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; - ixl_init_locked(pf); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixl_init_locked(pf); IXL_PF_UNLOCK(pf); } break;