From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbcFLKbi (ORCPT ); Sun, 12 Jun 2016 06:31:38 -0400 Received: from mailout3.hostsharing.net ([176.9.242.54]:53269 "EHLO mailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbcFLKbg (ORCPT ); Sun, 12 Jun 2016 06:31:36 -0400 X-Mailbox-Line: From 4d5477c1d76b2f0387a780f2142bbcdd9fee869b Mon Sep 17 00:00:00 2001 Message-Id: <4d5477c1d76b2f0387a780f2142bbcdd9fee869b.1465690253.git.lukas@wunner.de> In-Reply-To: References: From: Lukas Wunner Date: Sun, 12 Jun 2016 12:31:53 +0200 Subject: [PATCH v2 1/3] x86/quirks: Apply nvidia_bugs quirk only on root bus To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Bjorn Helgaas , Yinghai Lu Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 8659c406ade3 ("x86: only scan the root bus in early PCI quirks"), early quirks are only applied to devices on the root bus. The motivation was to prevent application of the nvidia_bugs quirk on secondary buses. We're about to reintroduce scanning of secondary buses for a quirk to reset the Broadcom 4331 wireless card on 2011/2012 Macs. To prevent regressions, open code the requirement to apply nvidia_bugs only on the root bus. Cc: Andi Kleen Cc: Linus Torvalds Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Lukas Wunner --- v2: - Move amendment of nvidia_bugs quirk to separate patch to allow for easier reviewing, bisecting and reverting (Bjorn Helgaas) arch/x86/kernel/early-quirks.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index bca14c8..256976f 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c @@ -76,6 +76,13 @@ static void __init nvidia_bugs(int num, int slot, int func) #ifdef CONFIG_ACPI #ifdef CONFIG_X86_IO_APIC /* + * Only applies to Nvidia root ports (bus 0) and not to + * Nvidia graphics cards with PCI ports on secondary buses. + */ + if (num) + return; + + /* * All timer overrides on Nvidia are * wrong unless HPET is enabled. * Unfortunately that's not true on many Asus boards. -- 2.8.1