Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3701049pxb; Mon, 24 Jan 2022 15:46:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqeAwPlV4viF/A+kVHltc1uWIXSoUj3ySVsmIvyVR0sTes1ZPn3Z46Y0ACj12mAU3ky4zG X-Received: by 2002:a17:902:b202:b0:149:9a8a:f93b with SMTP id t2-20020a170902b20200b001499a8af93bmr16015497plr.127.1643067965353; Mon, 24 Jan 2022 15:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067965; cv=none; d=google.com; s=arc-20160816; b=L+PmM3YcYspVN3k4kfptf1/gLeFXxaUab63wikGJd5FOi9rBxWVlFxKmz5i7VEocob /6otJ+hNNDj/e5BZasdoKdsgnpihlyBYiv+JgDsQPpzKYdFJGsRZHA+wS1ZTT569Qquu ZAvoEs0wnZltvcEdgr2XMp0gs5e+8T0yh0hpbAWi8WjjlpNU0aSEnJLaE1VOstz3i6NV 9Y+9xCXZmhgSkLN+6+Z3SZF6xg64dBrOK02Zd7NCJMh/v55/E4PHKlBU/eeA37h5iBVF MBd+ntsAKvJN0/cr+CTtPxdFL/E5hvZanTLGOocR804TvRK+1WWVRGXh0bOcbAsYPxMO l6JQ== 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=JLC7Rd8xHQHyDyzkzFXyQL+aBGasDggHx8axvZI+TNk=; b=qjSOBqsyFCs/V2AGH5rWvFMurLxnnWHsK/CIaCeBTq5zhkRBFzDsqLjeYI8BkY7YGa LOgTer9f2mnNChKgMYgmfbl1Y2pDeZrib+KV/Wm1mhjFyrNLHulW70k0GTYCw0shI03f NUVBSKWh0FzY5kTS37DrRtZsP3pH3EBKqJKiFKgD1tEFVRXMCnpZy7JtBhIc5NlWSsAb 0XsTtndbZICaZX/rIJuxe6O1IFJ3mf25rm4EEieub41vU3myfOPMUImkO51raTp/6hXK u95xzjH9LIdhczJDJtyWtTAz5vldErRpBGMtcOA5kc8eAvP5bBG55QMH6XYBKQqIuACr Bbxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hYWSSxeL; 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 h14si16398325pfh.343.2022.01.24.15.45.52; Mon, 24 Jan 2022 15:46: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=hYWSSxeL; 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 S2360124AbiAXXgF (ORCPT + 99 others); Mon, 24 Jan 2022 18:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1838741AbiAXWsA (ORCPT ); Mon, 24 Jan 2022 17:48:00 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D003BC068094; Mon, 24 Jan 2022 13:07:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6A63161446; Mon, 24 Jan 2022 21:07:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33995C340E5; Mon, 24 Jan 2022 21:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058438; bh=wObO+B5KFU6f959FvGizWAR8qcGc9TgRvKJQdmxbzMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hYWSSxeLF1xuLIi3U9ai7mz2AT/2SY09trC2pdk85m1+nBV9xvyZdNpn+9ubzGZQ+ SsyOzy9RMmXbBwPkQBljGdyMn4RZ9DUv8i4mQ6u1Dk7GD2OVMBv3Ze2sx5g5163wsz WxorQQYe9xG8n9duA+u1CX+m7x530rZHDUwA1/gY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kurt Kanzenbach , Vladimir Oltean , Richard Cochran , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 0289/1039] net: dsa: hellcreek: Fix insertion of static FDB entries Date: Mon, 24 Jan 2022 19:34:38 +0100 Message-Id: <20220124184134.995912313@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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: Kurt Kanzenbach [ Upstream commit 4db4c3ea56978086ca367a355e440de17d534827 ] The insertion of static FDB entries ignores the pass_blocked bit. That bit is evaluated with regards to STP. Add the missing functionality. Fixes: e4b27ebc780f ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/dsa/hirschmann/hellcreek.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c index 4e0b53d94b525..bb1a24c8078be 100644 --- a/drivers/net/dsa/hirschmann/hellcreek.c +++ b/drivers/net/dsa/hirschmann/hellcreek.c @@ -710,8 +710,9 @@ static int __hellcreek_fdb_add(struct hellcreek *hellcreek, u16 meta = 0; dev_dbg(hellcreek->dev, "Add static FDB entry: MAC=%pM, MASK=0x%02x, " - "OBT=%d, REPRIO_EN=%d, PRIO=%d\n", entry->mac, entry->portmask, - entry->is_obt, entry->reprio_en, entry->reprio_tc); + "OBT=%d, PASS_BLOCKED=%d, REPRIO_EN=%d, PRIO=%d\n", entry->mac, + entry->portmask, entry->is_obt, entry->pass_blocked, + entry->reprio_en, entry->reprio_tc); /* Add mac address */ hellcreek_write(hellcreek, entry->mac[1] | (entry->mac[0] << 8), HR_FDBWDH); @@ -722,6 +723,8 @@ static int __hellcreek_fdb_add(struct hellcreek *hellcreek, meta |= entry->portmask << HR_FDBWRM0_PORTMASK_SHIFT; if (entry->is_obt) meta |= HR_FDBWRM0_OBT; + if (entry->pass_blocked) + meta |= HR_FDBWRM0_PASS_BLOCKED; if (entry->reprio_en) { meta |= HR_FDBWRM0_REPRIO_EN; meta |= entry->reprio_tc << HR_FDBWRM0_REPRIO_TC_SHIFT; -- 2.34.1