Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4140925pxb; Mon, 8 Feb 2021 08:53:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6N704FUy5CFJq2atBhkIAYLm7u4UgsGyuF1OHyfDrDQP9991Ttrny5VgMA9YabKZJQV1Q X-Received: by 2002:a05:6402:38d:: with SMTP id o13mr16754571edv.155.1612803185635; Mon, 08 Feb 2021 08:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612803185; cv=none; d=google.com; s=arc-20160816; b=xNkryZrVXjLy9Do85usCOD4rLrYpDDDz16bcGK4edc2XtLKclIxFqnpX8kMc4d5/wc w9zfoxVrd1gtrIWmOfNpGr4wQoJm3XKTM1XhsLyyMttv8lB4xM+24sCd7xviSw0ENjMl w390W1YQ0wCAex/nhdUaJdjVca2B8vh+V5xwzj2dC61VNgbXG8EDdTnt4Kjk7glNICtc QkQTNHENX9I44sGLIYAOUIa3KIFrKraMyq5FJPrDWRcGeMpuBkeUrpSQ9lHzm0XMwypZ agLpo/qWqVQBB/bX9JELpwpIghxs4jpxOLTuTquugnPc1Eu8J5z0n2Tmd4zTLdEOVdrA rd7g== 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=VAeSy7mjzUAmUvA42dUOaUdlVevXG53knhdMC5Wx/NY=; b=ACTxuHbStFDKThtXxc6jqnSQtRaO2cvptQoxv7bwyKZtenrN4CRTJ9IvfLDTYEif7n sROAoif+fENBqj6zgHH5DtHkiaVRko8Zdw3fM3CfhGhNCDOBmpOKxQNWpoSfqQM01ixJ Me0LqBWhDaDYN9ivYIboWHZgTgJjcIlCwz2ZBeX7KhD5Y2AwovfYHAV9tvCP/cpGgmfd 9Ffwq+IWglM/YqjazhJi5eEqT84o6qa/AAg/BbuvEOvZasu2hNt4V74YLsMijBc9bpqG s7TpPfa4xwcOFB7i/L86bNyTNCaSIzbw9Uxeh1U5VFMR+52WX8iYzWfRbJnlTwtl4XeM 878A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NYSJoykx; 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 jt18si11740597ejb.633.2021.02.08.08.52.41; Mon, 08 Feb 2021 08:53:05 -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=NYSJoykx; 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 S229584AbhBHQv0 (ORCPT + 99 others); Mon, 8 Feb 2021 11:51:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:33712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233385AbhBHPRa (ORCPT ); Mon, 8 Feb 2021 10:17:30 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 528E264ED5; Mon, 8 Feb 2021 15:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797112; bh=xghOccYSA73hgfELd/klJXPilY5sPFpR8XW/ns7pQDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NYSJoykxPAzOrPrHnPiZuqB+rKG0/ILu+3NneFwaQcgxvTNjMV8rsqmIVLbfTAEks XZ8rUJAjhF5Ownk7rsb9/wz9jUGsHj9nWBlwFPyvZKAPdr6sojgA/bZcHxTUbAPZ88 HbMrg8iTqIxWpA1VGqolOhQr0Sav2ACO9TopkJSo= 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.4 63/65] net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add Date: Mon, 8 Feb 2021 16:01:35 +0100 Message-Id: <20210208145812.657752226@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145810.230485165@linuxfoundation.org> References: <20210208145810.230485165@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 @@ -1517,7 +1517,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; }