Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Oct 2017 18:33:56 +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-11@freebsd.org
Subject:   svn commit: r324324 - stable/11/sys/dev/qlxgbe
Message-ID:  <201710051833.v95IXuQW097402@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Thu Oct  5 18:33:56 2017
New Revision: 324324
URL: https://svnweb.freebsd.org/changeset/base/324324

Log:
  MFC r324026
  Fix delete all multicast addresses
  
  Submitted by:Anand.Khoje@cavium.com

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

Modified: stable/11/sys/dev/qlxgbe/ql_glbl.h
==============================================================================
--- stable/11/sys/dev/qlxgbe/ql_glbl.h	Thu Oct  5 17:52:38 2017	(r324323)
+++ stable/11/sys/dev/qlxgbe/ql_glbl.h	Thu Oct  5 18:33:56 2017	(r324324)
@@ -75,6 +75,7 @@ extern int ql_hw_check_health(qla_host_t *ha);
 extern void qla_hw_async_event(qla_host_t *ha);
 extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb,
 		uint32_t *num_rcvq);
+extern int qla_hw_del_all_mcast(qla_host_t *ha);
 
 extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp);
 extern void ql_minidump(qla_host_t *ha);

Modified: stable/11/sys/dev/qlxgbe/ql_hw.c
==============================================================================
--- stable/11/sys/dev/qlxgbe/ql_hw.c	Thu Oct  5 17:52:38 2017	(r324323)
+++ stable/11/sys/dev/qlxgbe/ql_hw.c	Thu Oct  5 18:33:56 2017	(r324324)
@@ -64,7 +64,6 @@ static int qla_link_event_req(qla_host_t *ha, uint16_t
 static int qla_tx_tso(qla_host_t *ha, struct mbuf *mp, q80_tx_cmd_t *tx_cmd,
 		uint8_t *hdr);
 static int qla_hw_add_all_mcast(qla_host_t *ha);
-static int qla_hw_del_all_mcast(qla_host_t *ha);
 static int qla_add_rcv_rings(qla_host_t *ha, uint32_t sds_idx, uint32_t nsds);
 
 static int qla_init_nic_func(qla_host_t *ha);
@@ -3413,7 +3412,7 @@ qla_hw_add_all_mcast(qla_host_t *ha)
 	return (ret);
 }
 
-static int
+int
 qla_hw_del_all_mcast(qla_host_t *ha)
 {
 	int ret;

Modified: stable/11/sys/dev/qlxgbe/ql_os.c
==============================================================================
--- stable/11/sys/dev/qlxgbe/ql_os.c	Thu Oct  5 17:52:38 2017	(r324323)
+++ stable/11/sys/dev/qlxgbe/ql_os.c	Thu Oct  5 18:33:56 2017	(r324324)
@@ -975,7 +975,19 @@ qla_set_multi(qla_host_t *ha, uint32_t add_multi)
 		return (-1);
 
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		ret = ql_hw_set_multi(ha, mta, mcnt, add_multi);
+
+		if (!add_multi) {
+			ret = qla_hw_del_all_mcast(ha);
+
+			if (ret)
+				device_printf(ha->pci_dev,
+					"%s: qla_hw_del_all_mcast() failed\n",
+				__func__);
+		}
+
+		if (!ret)
+			ret = ql_hw_set_multi(ha, mta, mcnt, 1);
+
 	}
 
 	QLA_UNLOCK(ha, __func__);



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