thunderbolt: Do not touch the hardware if the NHI is gone on resume
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 6 Jun 2017 12:25:15 +0000 (15:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:42:43 +0000 (11:42 +0200)
commitbdccf295d7cdf6f28ceec1dcc31a79d0a1697d21
tree41926128da459fc10bfaba4b3ce6feec0cab1a0e
parent3e13676862f90dbf5b00d57d5599e57788289897
thunderbolt: Do not touch the hardware if the NHI is gone on resume

On PCs the NHI host controller is only present when there is a device
connected. When the last device is disconnected the host controller will
dissappear shortly (within 10s). Now if that happens when we are
suspended we should not try to touch the hardware anymore, so add a flag
for this and check it before we re-enable rings.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Michael Jamet <michael.jamet@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/nhi.c
drivers/thunderbolt/nhi.h