Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4184483pxb; Mon, 8 Feb 2021 09:52:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCaCA+sR3Nu16aefct2Iup0ulW9/Q9uj5bO3Jc8zBU95GBgTcO+hXTWb/Ujws/h5yLgvOt X-Received: by 2002:a50:ec06:: with SMTP id g6mr18313360edr.12.1612806756491; Mon, 08 Feb 2021 09:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612806756; cv=none; d=google.com; s=arc-20160816; b=yg1WqncTLRFfIcOESGR53igYokGCe6dJtu5yYEmqIEPFpNpvdUdoW2td1sbVJHnVZq YfDNiuKzAvFoubWptmhL7haDG6IT/EJy0fo0100gQ9xDdhIh4AyriWnLd+OnTmsqQcD1 S6jY1NHaxgXPpNt/UZkb5ma8MLkLHXyD0pzg01CouVbN5tLDm2zqpJ2mKhzgWONKOqbT dDBUwGYM3I5UvF7mVUN7OxuIW2Zx2FjBLbXYTQ+4OgwqrmS8kfCp8gceb3eiNWHCf3Nu DfFkfZW5fMKEkpK8c9F7y6aS2Kzv4fhL/FQ71ppqinNL4QjE/4o2cQzkU8k8XOwyb0q+ zSBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W3TEH2zRFoHZiVVGPFk3f3cE7zYabE0y2MLjJL6Zl54=; b=jSzSUvYZUORUj14kQmwymClnIMm6QUbSPfmvwZYDZmQ6ddiMCEgoHSXujMMZQ07YPz 3NrZrgipP0bezTkjDD9ApgYY7atVzS5nSvVRlkilGdf2sxxmCpluPHAEiZOtgDn5xNya m9vaCFR6d0UXyY7kuNCW4NcHOIMQYpaSpHos60exJKrqigORgBNw6ZQN5103fOoY/UZ5 Lbpy7yV4nj8FCyoFkZ2gwT0n/I/nMOIH/9e88xFLSBr1hj8ZFSAJH8ZmJiDMzKsfUpKB 7AfamfOfukIGpehr9fil43hKlcHZAb+IuQPBdccbqHca5Sqfz6XyDF7+l1GlL9qu8C7o wdog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="U/kN1zc1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jo13si11325799ejb.607.2021.02.08.09.52.11; Mon, 08 Feb 2021 09:52:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="U/kN1zc1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231937AbhBHRvA (ORCPT + 99 others); Mon, 8 Feb 2021 12:51:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:37830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbhBHPb7 (ORCPT ); Mon, 8 Feb 2021 10:31:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CDF264F35; Mon, 8 Feb 2021 15:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797464; bh=CuuS7DDKRy19ZcGuixhP00qVe/7P/5RSrEZvzhe/42E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U/kN1zc1lz37Rpjunh5lzeSjGjD0AFcYx0jlqY/dkgdrdbokrN/Jsq5M7r4dLQsvc ngIKvjbUUyRpPpHR7URFThom2EQV1Lxjs7OWWHMlq1Y8gmdOJ/sId3y+PXxOtvsCl/ dJUeS7ITXfcqUNzPAqmWA+55KbbJeDXDjDKuAZSo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, DENG Qingfang , Vladimir Oltean , Jakub Kicinski Subject: [PATCH 5.10 119/120] net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add Date: Mon, 8 Feb 2021 16:01:46 +0100 Message-Id: <20210208145823.122073711@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: DENG Qingfang commit f72f2fb8fb6be095b98af5d740ac50cffd0b0cae upstream. Having multiple destination ports for a unicast address does not make sense. Make port_db_load_purge override existent unicast portvec instead of adding a new port bit. Fixes: 884729399260 ("net: dsa: mv88e6xxx: handle multiple ports in ATU") Signed-off-by: DENG Qingfang Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210130134334.10243-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/mv88e6xxx/chip.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1669,7 +1669,11 @@ static int mv88e6xxx_port_db_load_purge( if (!entry.portvec) entry.state = 0; } else { - entry.portvec |= BIT(port); + if (state == MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC) + entry.portvec = BIT(port); + else + entry.portvec |= BIT(port); + entry.state = state; }