From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF3372F6931; Sat, 12 Sep 2026 19:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240684; cv=none; b=HMgOmJh/eMLWETkUAIClcNVwwszW8qt1+YC705fyMRl40KDvpRbSv4UH47pOpI1Pcwr7CQjGL+UXF4SgJMrVtWh1FSIBjcn9ACgl2eewT0CfuKAg80uI7ogpsKU9xzJ2w4mvinD9IfS/Q4wXu3Tfg3pQwREj00J0+0flMyhiZIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240684; c=relaxed/simple; bh=howgbjdC8kU5YMXpDYp6AM9BclPYupAAUMiAkYEXK7k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YY4HrUagB7daXM81OrfHuq/PJDxfH8bT7nl9fccIOsq4rSXunYetxkvkhFkElHgk87Z9Gp8eevyKgsVU0EGT3r+VJTsPyBtLQ2jP69naw9DMjEm6R3SfPoldDppYdG4s0sohRPmsaxJtLa5evTLqwryMDOiM+OO1IByptDpG5xU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=N9YP9d9W; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="N9YP9d9W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA0AE1F000FF; Sat, 12 Sep 2026 19:18:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789240682; bh=8CHaXZe1jTF/KDPQRDbCXkAujM0hhNhkn8I3xYpOWcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=N9YP9d9WBXR5nlawmE3xhkE9dI9rU1B0AyfvFdBOD+iNaKGI4NWdPrYy13uLWDifM 38fcVta4zV30qx9+2TJpXZKtIPRCugIatbEwilGEoJYPfTU9nEefC8gJp3x+C/gwLC 3/LHXLJbzTMM7xyRZUoNB9NHwC1rMxcwr2ztcXgM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Chevallier , Andrew Lunn , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 919/935] net: stmmac: dwxgmac: Account for the primary MAC address for UC filtering Date: Sat, 12 Sep 2026 09:05:49 +0200 Message-ID: <20260912065547.898950328@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maxime Chevallier [ Upstream commit 2739d6f9a2b8729b0d85cbe0dc93e1d68670b6f2 ] The same filter slots are used to store the main MAC address as well as the address for the unicast filter. Let's account for that when deciding whether or not to use promisc when programming the UC list in hardware. Fixes: 0efedbf11f07 ("net: stmmac: xgmac: Fix XGMAC selftests") Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20260826140500.616466-5-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c index ce0c470915bc2..17fb959803ed3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -499,7 +499,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw, dwxgmac2_set_mchash(ioaddr, mc_filter, mcbitslog2); /* Handle multiple unicast addresses */ - if (netdev_uc_count(dev) > hw->unicast_filter_entries) { + if (netdev_uc_count(dev) + 1 > hw->unicast_filter_entries) { value |= XGMAC_FILTER_PR; } else { struct netdev_hw_addr *ha; -- 2.53.0