From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F09C4221D9F; Thu, 12 Dec 2024 16:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734020957; cv=none; b=HD9wAelLcBFZwYdOZE4ZiutPg6L+5cL5zLfNy/dcubQ4ftn5+mpBuXjtPE08ssU1K1Vb2QnJtr2sAadzT4m92QjAy8zIcKDykf1raxtPG3mYymgOgOIsinvivSpZO8V1+m0qyb0kyBuV+1Z7aQI3cmWwdBfE5JW3Xx6G06d/cus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734020957; c=relaxed/simple; bh=wBe2R8gFRhTz19ihLfMZOa5Fp+aw800jgMkClChwrRc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gKuXbgiwv+XihYgqn1sqC0+2H9/zNBEGgh7OuQVqrP5YEuQx3CEmoZ5UALVmttp9X2w5fE1l5gNG9VYt+7/S0zYNzUJWtGgaxUutCHDTgXip/SlWiyrFtucx25DQQ6xV5/dS65IIK726A3CwXtI4YuvKNvJ52/614DuruQO27aA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gow5oqqf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Gow5oqqf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48251C4CED0; Thu, 12 Dec 2024 16:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734020956; bh=wBe2R8gFRhTz19ihLfMZOa5Fp+aw800jgMkClChwrRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gow5oqqfkn+iLhDAYJlB0uURr3SPnPF0Pe4LG5iyG5SzNuq9zhUSjXSEcEpytsBbc 7Vo04v65GFpEJs4v6oC3wR8HIG9Ob72VvrG8alQj1iTqrF/KlLlV8Mk/ZZJ9UghDCW OphYMdVnn8KsHosLw0WoLLHbjcqyCI/DI0eUhrkM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexander Sverdlin , Vignesh Raghavendra , Guenter Roeck , Wim Van Sebroeck Subject: [PATCH 6.1 607/772] watchdog: rti: of: honor timeout-sec property Date: Thu, 12 Dec 2024 15:59:12 +0100 Message-ID: <20241212144415.005360298@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144349.797589255@linuxfoundation.org> References: <20241212144349.797589255@linuxfoundation.org> User-Agent: quilt/0.67 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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Sverdlin commit 4962ee045d8f06638714d801ab0fb72f89c16690 upstream. Currently "timeout-sec" Device Tree property is being silently ignored: even though watchdog_init_timeout() is being used, the driver always passes "heartbeat" == DEFAULT_HEARTBEAT == 60 as argument. Fix this by setting struct watchdog_device::timeout to DEFAULT_HEARTBEAT and passing real module parameter value to watchdog_init_timeout() (which may now be 0 if not specified). Cc: stable@vger.kernel.org Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Alexander Sverdlin Reviewed-by: Vignesh Raghavendra Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20241107203830.1068456-1-alexander.sverdlin@siemens.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/rti_wdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -54,7 +54,7 @@ #define MAX_HW_ERROR 250 -static int heartbeat = DEFAULT_HEARTBEAT; +static int heartbeat; /* * struct to hold data for each WDT device @@ -240,6 +240,7 @@ static int rti_wdt_probe(struct platform wdd->min_timeout = 1; wdd->max_hw_heartbeat_ms = (WDT_PRELOAD_MAX << WDT_PRELOAD_SHIFT) / wdt->freq * 1000; + wdd->timeout = DEFAULT_HEARTBEAT; wdd->parent = dev; watchdog_set_drvdata(wdd, wdt);