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 6871B433042; Tue, 21 Jul 2026 19:41:28 +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=1784662889; cv=none; b=SMtHfylfJaJezEJrPVpz1OjnTAgeA1TlBLiKU4ngegqCP0EjmDmq+anwkKgfyoVfQj/v6UOLhWKBhxlKEpzN4ISf+5+CnAoXXWzna4J2Pg1VchjoeiSXndgjD37vQCB+WIdjcM+qVayIis4P3pT12KAkB92KYM5zdA7Ums27Tc0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662889; c=relaxed/simple; bh=+GiB6oMlXItRuNitWBxMxFClDCHCYrRqNcgrGjr79Xs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TeiHr5pdEaugrlyf1tw1BygH/IgaW2RBAToTqul6p+CHRvKAsVwUxwr2jOMrP2swPqo/r3sy5C5rvB0oNMF5AGRff/pZu7pqKfgt+pyPjglvQd7jUcIykuprgMsvTLB+MV4a6d1aiFr8r+M2iZGkaf6q100+DwzKOpaypYbBo3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nIsJNoJt; 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="nIsJNoJt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD23B1F000E9; Tue, 21 Jul 2026 19:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662888; bh=JKfTvLQENpr00PUro978t5Zc6pUt7ySx2WkjNOs7bmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nIsJNoJtkkusFev2yXzJK6+saMV1wbxxZJkTOTQNHyIkFY6YSNWxYboupsjvZExrH AN+nsAPtjAnOGT61iW/XiX4Hz0WzN+XoLHs6ECSL/BYX/JPtPR4oYq+ws74ziE8+0X 9rKuVpoBJzhVarhYY9dmfM2fuksxTgVdne9V0EhY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Antoni Pokusinski , Alexandre Belloni , Sasha Levin Subject: [PATCH 6.12 0616/1276] rtc: abx80x: fix the RTC_VL_CLR clearing all status flags Date: Tue, 21 Jul 2026 17:17:39 +0200 Message-ID: <20260721152459.894671119@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@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 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antoni Pokusinski [ Upstream commit 419719c514252a2dbb2e2976f564c83417dd6d0a ] The RTC_VL_CLR ioctl intends to clear only the battery low flag (BLF), however the current implementation writes 0 to the status register, clearing all status bits. Fix this by writing back the masked status value so that only BLF is cleared, preserving other status flags. Fixes: ffe1c5a2d427 ("rtc: abx80x: Implement RTC_VL_READ,CLR ioctls") Signed-off-by: Antoni Pokusinski Link: https://patch.msgid.link/20260415160610.127155-2-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-abx80x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c index 5f3a3e60a19d09..862833519d7f4d 100644 --- a/drivers/rtc/rtc-abx80x.c +++ b/drivers/rtc/rtc-abx80x.c @@ -545,7 +545,8 @@ static int abx80x_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) status &= ~ABX8XX_STATUS_BLF; - tmp = i2c_smbus_write_byte_data(client, ABX8XX_REG_STATUS, 0); + tmp = i2c_smbus_write_byte_data(client, ABX8XX_REG_STATUS, + status); if (tmp < 0) return tmp; -- 2.53.0