Commit 29942c22 authored by Lakshmi Yadlapati's avatar Lakshmi Yadlapati Committed by sanglipeng1
Browse files

hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us

stable inclusion
from stable-v5.10.217
commit 7788fc8a8b8ea2c9fb1d7315f9ce2e0ab25ecfbb
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAWLXC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7788fc8a8b8ea2c9fb1d7315f9ce2e0ab25ecfbb



--------------------------------

commit 26e8383b116d0dbe74e28f86646563ab46d66d83 upstream.

Following the failure observed with a delay of 250us, experiments were
conducted with various delays. It was found that a delay of 350us
effectively mitigated the issue.

To provide a more optimal solution while still allowing a margin for
stability, the delay is being adjusted to 500us.

Signed-off-by: default avatarLakshmi Yadlapati <lakshmiy@us.ibm.com>
Link: https://lore.kernel.org/r/20240507194603.1305750-1-lakshmiy@us.ibm.com


Fixes: 8d655e65 ("hwmon: (ucd90320) Add minimum delay between bus accesses")
Reviewed-by: default avatarEddie James <eajames@linux.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng1 <sanglipeng1@jd.com>
parent 9bd73da5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -80,11 +80,11 @@ struct ucd9000_debugfs_entry {
 * It has been observed that the UCD90320 randomly fails register access when
 * doing another access right on the back of a register write. To mitigate this
 * make sure that there is a minimum delay between a write access and the
 * following access. The 250us is based on experimental data. At a delay of
 * 200us the issue seems to go away. Add a bit of extra margin to allow for
 * following access. The 500 is based on experimental data. At a delay of
 * 350us the issue seems to go away. Add a bit of extra margin to allow for
 * system to system differences.
 */
#define UCD90320_WAIT_DELAY_US 250
#define UCD90320_WAIT_DELAY_US 500

static inline void ucd90320_wait(const struct ucd9000_data *data)
{