Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2017 01:23:35 +0000 (UTC)
From:      David C Somayajulu <davidcs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r321497 - stable/10/sys/dev/qlxgbe
Message-ID:  <201707260123.v6Q1NZ3v096155@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Wed Jul 26 01:23:35 2017
New Revision: 321497
URL: https://svnweb.freebsd.org/changeset/base/321497

Log:
  MFC 320694
  Allow MTU changes without ifconfig down/up

Modified:
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_os.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/qlxgbe/ql_hw.c
==============================================================================
--- stable/10/sys/dev/qlxgbe/ql_hw.c	Wed Jul 26 01:19:49 2017	(r321496)
+++ stable/10/sys/dev/qlxgbe/ql_hw.c	Wed Jul 26 01:23:35 2017	(r321497)
@@ -2498,6 +2498,9 @@ ql_init_hw_if(qla_host_t *ha)
 	if (qla_hw_add_all_mcast(ha))
 		return (-1);
 
+	if (ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id))
+		return (-1);
+
 	if (qla_config_rss(ha, ha->hw.rcv_cntxt_id))
 		return (-1);
 

Modified: stable/10/sys/dev/qlxgbe/ql_os.c
==============================================================================
--- stable/10/sys/dev/qlxgbe/ql_os.c	Wed Jul 26 01:19:49 2017	(r321496)
+++ stable/10/sys/dev/qlxgbe/ql_os.c	Wed Jul 26 01:23:35 2017	(r321497)
@@ -985,8 +985,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 				ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
 
 			if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) {
-				ret = ql_set_max_mtu(ha, ha->max_frame_size,
-					ha->hw.rcv_cntxt_id);
+				qla_init_locked(ha);
 			}
 
 			if (ifp->if_mtu > ETHERMTU)
@@ -1019,11 +1018,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 					ret = ql_set_allmulti(ha);
 				}
 			} else {
-				qla_init_locked(ha);
 				ha->max_frame_size = ifp->if_mtu +
 					ETHER_HDR_LEN + ETHER_CRC_LEN;
-				ret = ql_set_max_mtu(ha, ha->max_frame_size,
-					ha->hw.rcv_cntxt_id);
+				qla_init_locked(ha);
 			}
 		} else {
 			if (ifp->if_drv_flags & IFF_DRV_RUNNING)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707260123.v6Q1NZ3v096155>