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 17D602BE02A; Wed, 20 May 2026 17:02:41 +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=1779296565; cv=none; b=MkpUUBm2NMp1pNcAD9dkKUwE8t5FR+wBnXFsXKNVoDsrihwS3tw5/kAMSmwzZfEEpffK/lGUyIfVWatV5ZA4v9E+rHdRrgMwOmbbdG2xmtIfkbNPMzWpJyAvtRNtyu0yS9GCuuXr7AnMwU8D+mvKXA19ElWPaAm1t6rrLqWLY3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779296565; c=relaxed/simple; bh=pb3n3QgUOdAOzj+TlDgRQfssl8ti7vwih2c5gXJZSCs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ObT45rbj2n0BSgN8SVnKM5yRwdSG95qmxp8ePcqCoQK7dsrzGrNaUQ4XRdAGqGuxhCQm+OfQeSgDfz5dDpd6bHmzHasRAIauitjDP41CCZN1lW7Z39V7Lgq8ajta71zS6VLkLkiYRvB/IZGIUesJOPFxt+3/aC1p4ZqXEdKmPJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JPD05GWS; 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="JPD05GWS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE92B1F00893; Wed, 20 May 2026 17:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779296561; bh=x/LT5sBpg7M7IuqjvQt4d9at2ahl6PiQ1STLuFkTOp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JPD05GWSFfgY2LQcb0xMm1vUqsnoBfcF3IAc8bg/mgY9Qw+v9vS9VSncnTe4amRn4 TdTzEN35hNNSlPICXvQ3NwSuwDPy51ymkLnIKl1TAREEqYtT4d41UiyE8w+zQqfHvi ugx9wgpCSu7+Liju+68Cj8EJXqm4kF3HAYNVHjVk= 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 7.0 0846/1146] net: dsa: realtek: rtl8365mb: fix mode mask calculation Date: Wed, 20 May 2026 18:18:16 +0200 Message-ID: <20260520162207.381223893@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162148.390695140@linuxfoundation.org> References: <20260520162148.390695140@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 7.0-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 31fa94dac627d..c35cef01ec265 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