From owner-svn-src-stable@freebsd.org Thu Oct 5 19:01:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14D3AE3FC0B; Thu, 5 Oct 2017 19:01:49 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7859821D4; Thu, 5 Oct 2017 19:01:48 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v95J1mDj009013; Thu, 5 Oct 2017 19:01:48 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v95J1lAQ009010; Thu, 5 Oct 2017 19:01:47 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201710051901.v95J1lAQ009010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 5 Oct 2017 19:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r324332 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/9/sys/dev/qlxgbe X-SVN-Commit-Revision: 324332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 19:01:49 -0000 Author: davidcs Date: Thu Oct 5 19:01:47 2017 New Revision: 324332 URL: https://svnweb.freebsd.org/changeset/base/324332 Log: MFC r324026 Fix delete all multicast addresses Submitted by: Anand.Khoje@cavium.com Modified: stable/9/sys/dev/qlxgbe/ql_glbl.h stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_glbl.h Thu Oct 5 19:00:22 2017 (r324331) +++ stable/9/sys/dev/qlxgbe/ql_glbl.h Thu Oct 5 19:01:47 2017 (r324332) @@ -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/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.c Thu Oct 5 19:00:22 2017 (r324331) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Thu Oct 5 19:01:47 2017 (r324332) @@ -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/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.c Thu Oct 5 19:00:22 2017 (r324331) +++ stable/9/sys/dev/qlxgbe/ql_os.c Thu Oct 5 19:01:47 2017 (r324332) @@ -980,7 +980,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__);