From patchwork Wed Aug 19 11:58:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 251730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FA3DC433E1 for ; Wed, 19 Aug 2020 12:03:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06611205CB for ; Wed, 19 Aug 2020 12:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728273AbgHSMDV (ORCPT ); Wed, 19 Aug 2020 08:03:21 -0400 Received: from mga07.intel.com ([134.134.136.100]:61774 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728465AbgHSL7R (ORCPT ); Wed, 19 Aug 2020 07:59:17 -0400 IronPort-SDR: jWqWtX1glcMnSJJ+x6+dkeC0kkEzU1DeOtQm7yUGgAK9N9EUJEqO6YdtAnDW4uoi8tGXDGktZ/ kBDbyX7wN6uw== X-IronPort-AV: E=McAfee;i="6000,8403,9717"; a="219396076" X-IronPort-AV: E=Sophos;i="5.76,331,1592895600"; d="scan'208";a="219396076" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2020 04:59:14 -0700 IronPort-SDR: NnJVoq61uZ6zB5jh7Tf8h7wkIB9R7RwR0g82aNCd5/IlM59m4U/UsSF+9IZKVPjAFCXvwDHBHm ISHXAHtIQsMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,331,1592895600"; d="scan'208";a="327067238" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 19 Aug 2020 04:59:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id AAB20467; Wed, 19 Aug 2020 14:59:06 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Michael Jamet , Yehezkel Bernat , Mika Westerberg , Andreas Noever , Rajmohan Mani , Dana Alkattan , Lukas Wunner , "Rafael J . Wysocki" , Bjorn Helgaas , Len Brown , Greg Kroah-Hartman , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 09/19] thunderbolt: Initialize TMU again on resume Date: Wed, 19 Aug 2020 14:58:55 +0300 Message-Id: <20200819115905.59834-10-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200819115905.59834-1-mika.westerberg@linux.intel.com> References: <20200819115905.59834-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The TMU will be reset after router exits sleep so in order to re-configure it upon resume make sure the structure is initialized again based on the current hardware state. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/switch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index fb30ea1dfc31..de186d6ed166 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2534,6 +2534,10 @@ int tb_switch_resume(struct tb_switch *sw) if (err) return err; + err = tb_switch_tmu_init(sw); + if (err) + return err; + /* check for surviving downstream switches */ tb_switch_for_each_port(sw, port) { if (!tb_port_has_remote(port) && !port->xdomain)