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 65F753F1ADC; Wed, 20 May 2026 17:46:33 +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=1779299194; cv=none; b=UwZlis4Ii8WJ1iyJ+bqDUdSUbMl5PQjAnSB4wjBVn4LkHVyUfbEnjrNSbTGCl9PS/n4w+Z/YOzSUJBQrDztmhS4hdyiqP3ct9t/mbYWaOW7rKCqoMWkhrPzyiEuR8IZNcHlW1mULvh8gfUiU01wPsdA10tqwUFfXdmQA33uD/XU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779299194; c=relaxed/simple; bh=gOSIJ59HOxBa5XhN3PbH/5/ysgcDOCJJJ85wUEXyRaI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uexCgwajsW2PgARukC/muaxrlTc5/0otf/EMxUItU+Z2hMTeYjtj9Or+CGUO3P3XXVhR4QMnO5+21+C8IpkgdrFStfs3ASUw1FLYdSHdBCJz3VFlDfhbP3dWHmumxPPBVz6zdTbRPzYY0tmAwki3ZoyqzHFDxEg2gh4WgzldD7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ozb8w7Pn; 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="Ozb8w7Pn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CACF21F000E9; Wed, 20 May 2026 17:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779299193; bh=UTxV97LsMwBjbPEJzqpDLPBUW3ZguiLlV8ovLGx/pQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ozb8w7PnWRszhEaDMieAVd96GGsHcaOty1zvzI+zJDzmq/slYM0cTf/rVuJ9Se+iW vYS+v1/+Zw79UPtuTnXau1yTmfl+nJLXYSQqGugwDq3ZiON5I5iYR7itaV5g/1X4hv Jaiwf2ZYFiX/k+QW8d/fPk0+qpgLO0W5GlEw2e6c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Abdulkader Alrezej , Mieczyslaw Nalewaj , Luiz Angelo Daros de Luca , Paolo Abeni , Sasha Levin Subject: [PATCH 6.18 697/957] net: dsa: realtek: rtl8365mb: fix mode mask calculation Date: Wed, 20 May 2026 18:19:40 +0200 Message-ID: <20260520162149.655778122@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162134.554764788@linuxfoundation.org> References: <20260520162134.554764788@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mieczyslaw Nalewaj [ Upstream commit 0c078021d3861966614d5e594ee03587f0c9e74d ] The RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK macro was shifting the 4-bit mask (0xF) by only (_extint % 2) bits instead of (_extint % 2) * 4. This caused the mask to overlap with the adjacent nibble when configuring odd-numbered external interfaces, selecting the wrong bits entirely. Align the shift calculation with the existing ...MODE_OFFSET macro. Fixes: 4af2950c50c8 ("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC") Signed-off-by: Abdulkader Alrezej Signed-off-by: Mieczyslaw Nalewaj Reviewed-by: Luiz Angelo Daros de Luca Link: https://patch.msgid.link/400a6387-a444-4576-af6d-26be5410bce3@yahoo.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/dsa/realtek/rtl8365mb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 3a48db295e7e4..e10a789e22022 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -216,7 +216,7 @@ (_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \ 0x0) #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \ - (0xF << (((_extint) % 2))) + (0xF << (((_extint) % 2) * 4)) #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(_extint) \ (((_extint) % 2) * 4) -- 2.53.0