platform/x86: ISST: Account for increased timeout in some cases
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 30 Mar 2021 22:08:40 +0000 (15:08 -0700)
committerHans de Goede <hdegoede@redhat.com>
Wed, 7 Apr 2021 17:47:22 +0000 (19:47 +0200)
commit5c782817a981981917ec3c647cf521022ee07143
tree8e4aaba8224abf3bf8a49811b3ba9f044af97966
parent61ce18ff01ec17de2b89bbab319e6974d3a3231c
platform/x86: ISST: Account for increased timeout in some cases

In some cases when firmware is busy or updating, some mailbox commands
still timeout on some newer CPUs. To fix this issue, change how we
process timeout.

With this change, replaced timeout from using simple count with real
timeout in micro-seconds using ktime. When the command response takes
more than average processing time, yield to other tasks. The worst case
timeout is extended upto 1 milli-second.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20210330220840.3113959-1-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c