Skip to content
Commit 3a92731d authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Paul Gortmaker
Browse files

i2c: nvidia-gpu: Handle timeout correctly in gpu_i2c_check_status()

commit d944b27d upstream.

Nvidia card may come with a "phantom" UCSI device, and its driver gets
stuck in probe routine, prevents any system PM operations like suspend.

There's an unaccounted case that the target time can equal to jiffies in
gpu_i2c_check_status(), let's solve that by using readl_poll_timeout()
instead of jiffies comparison functions.

Fixes: c71bcdcb

 ("i2c: add i2c bus driver for NVIDIA GPU")
Suggested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarAjay Gupta <ajayg@nvidia.com>
Tested-by: default avatarAjay Gupta <ajayg@nvidia.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 3241346e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment