From patchwork Tue Jul 26 16:40:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Noever X-Patchwork-Id: 9248429 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7459607F2 for ; Tue, 26 Jul 2016 16:41:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D94A62723E for ; Tue, 26 Jul 2016 16:41:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC611272AA; Tue, 26 Jul 2016 16:41:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E00826223 for ; Tue, 26 Jul 2016 16:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757226AbcGZQlF (ORCPT ); Tue, 26 Jul 2016 12:41:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36641 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757129AbcGZQlD (ORCPT ); Tue, 26 Jul 2016 12:41:03 -0400 Received: by mail-wm0-f65.google.com with SMTP id x83so2520222wma.3; Tue, 26 Jul 2016 09:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=04zPUGsVBgiLIrrkF/CvRj3ykesJUDc6z8ZEroGJXS4=; b=NozJ8bW5tvlZIpAO2BypwPCkIjVijEoWwDzEifSoYD0wMbfIKfuniF+72ExI0a0OxT AajVnOhvkXAWkg8KAQnFihnEnlk54/pU11LzrWi9I6IYivIY0+p9OJL5dqJuXSd+lZyY hdisoklTevBDvB0ug3R3A6ZI/pJfMwNcv7B6IOAx1bahAiHulpOSyY1n6PGzCectGPNW Vzi1GDYBtPnykE8d3ccu5LcW3bcIsbph/OjHrLb3d6bZKQPPVYAxeVBLdiQCu5181RF0 WGuJEceeBlCWXwiSuOUxPAI2STRHqKZeqR05JqpgJ7cm5Fg3BKax7MAnV1hJJptHgZKy iQsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=04zPUGsVBgiLIrrkF/CvRj3ykesJUDc6z8ZEroGJXS4=; b=Z6s/HTEM1TD8dB5/7+5w3DLR9nkQVBSMq33Nal1x4ozOD7vs60TUTqcl6mqFjeOvzf +UaNJRy1KNlrFkahHJG5iBflBNpjDmRWmG/z+kuoXPaZMsGazTYINyeCy2uNIxdrYAJ8 K1d5b6/FV3nANfiK+q/0AdaER6RonSMuIMi804e/ayWh10Tci6z4/eDQNDzQQN7TwmrX paz1gowBfWhjLtdk2ntl0ZbBiRHUMSLh347gbbobyWP4FNTTk7dvk1Ud2hBKfwv3ByPu UugbjFwDFM9WsHh3FlPgqz1KAP81ZI6hl733j6OvH2b7nFsvBYWB3pGkxkCl5uZNPw/j sllA== X-Gm-Message-State: AEkoouuqZ2fynEcee98lFxNeHsrOp6J0giByNF+vF0/fw/Db2H3febS1pAKm6j9MA4VeFw== X-Received: by 10.194.11.72 with SMTP id o8mr23815685wjb.10.1469551261230; Tue, 26 Jul 2016 09:41:01 -0700 (PDT) Received: from localhost.localdomain (anoever.inf.ethz.ch. [129.132.153.240]) by smtp.gmail.com with ESMTPSA id g7sm1848177wjx.10.2016.07.26.09.40.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 09:41:00 -0700 (PDT) From: Andreas Noever To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, xavier.gnata@gmail.com, gregkh@linuxfoundation.org Cc: lukas@wunner.de, helgaas@kernel.org, Andreas Noever Subject: [PATCH 2/2] thunderbolt: Add support for INTEL_FALCON_RIDGE_2C controller. Date: Tue, 26 Jul 2016 18:40:38 +0200 Message-Id: <20160726164038.1481-2-andreas.noever@gmail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160726164038.1481-1-andreas.noever@gmail.com> References: <20160726164038.1481-1-andreas.noever@gmail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xavier Gnata From: Xavier Gnata Add support to INTEL_FALCON_RIDGE_2C controller and corresponding quirk to support suspend/resume. Tested against 4.7 master on a MacBook Air 11" 2015. Signed-off-by: Andreas Noever --- drivers/pci/quirks.c | 4 ++++ drivers/thunderbolt/nhi.c | 6 ++++++ 2 files changed, 10 insertions(+) Rebased version of Xavier's patch. Xavier, could you verify that this still works on your system? Thanks, Andreas diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 75b2105..981f17d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3325,6 +3325,7 @@ static void quirk_apple_wait_for_thunderbolt(struct pci_dev *dev) if (nhi->vendor != PCI_VENDOR_ID_INTEL || (nhi->device != PCI_DEVICE_ID_INTEL_LIGHT_RIDGE && nhi->device != PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C && + nhi->device != PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_NHI && nhi->device != PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI) || nhi->class != PCI_CLASS_SYSTEM_OTHER << 8) goto out; @@ -3341,6 +3342,9 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C, quirk_apple_wait_for_thunderbolt); DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_BRIDGE, + quirk_apple_wait_for_thunderbolt); +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_BRIDGE, quirk_apple_wait_for_thunderbolt); #endif diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 9c15344..a8c2041 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -651,6 +651,12 @@ static struct pci_device_id nhi_ids[] = { { .class = PCI_CLASS_SYSTEM_OTHER << 8, .class_mask = ~0, .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_NHI, + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, + }, + { + .class = PCI_CLASS_SYSTEM_OTHER << 8, .class_mask = ~0, + .vendor = PCI_VENDOR_ID_INTEL, .device = PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, },