thunderbolt: Optimize NHI LC mailbox command processing
authorRajmohan Mani <rajmohan.mani@intel.com>
Mon, 17 Aug 2020 15:55:21 +0000 (08:55 -0700)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 3 Sep 2020 09:06:40 +0000 (12:06 +0300)
commit6651c91de042f8ad601b522cb8d33de84246ddc7
tree5d5ba0056868b8ca86fdd5b080328fec2c2e82b3
parentdc4c4bf122ed58f7fc1870c483e2e1dbe6912b2f
thunderbolt: Optimize NHI LC mailbox command processing

Currently the Ice Lake and Tiger Lake NHI (host controller) LC (link
controller) mailbox command processing checks for the completion of
command every 100 msecs. These controllers are found to complete this in
the order of 1 ms or so. Since this delay is in suspend path, surplus
delay is effectively affecting runtime PM suspend flows.

Optimize this so that we do the wait for 1 ms after reading the mailbox
register. This should make Ice Lake and Tiger Lake runtime suspend take
less time to complete.

Reported-by: Dana Alkattan <dana.alkattan@intel.com>
Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/nhi_ops.c