usb: xhci: dbc: Don't decrement runtime PM counter if DBC is not started
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Mon, 2 Jul 2018 14:13:31 +0000 (17:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jul 2018 15:19:27 +0000 (17:19 +0200)
commit74cb319bd97dd62881f97ea5a3228f7c2546bf56
tree4cbcdc81c5dacb075f0547804e6652a75155f816
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063
usb: xhci: dbc: Don't decrement runtime PM counter if DBC is not started

pm_runtime_put_sync() gets called everytime in xhci_dbc_stop().

If dbc is not started, this makes the runtime PM counter incorrectly
becomes 0, and calls autosuspend function. Then we'll keep seeing this:
[54664.762220] xhci_hcd 0000:00:14.0: Root hub is not suspended

So only calls pm_runtime_put_sync() when dbc was started.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-dbgcap.c