From: Yinghai Lu <yinghai@kernel.org>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 07/11] PCI: Use class for quirk for legacy ATA NO_D3
Date: Thu, 23 Feb 2012 23:46:55 -0800 [thread overview]
Message-ID: <1330069619-14446-8-git-send-email-yinghai@kernel.org> (raw)
In-Reply-To: <1330069619-14446-1-git-send-email-yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/quirks.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f41e00d..a860812 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1166,17 +1166,20 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, qui
static void __devinit quirk_no_ata_d3(struct pci_dev *pdev)
{
- /* Quirk the legacy ATA devices only. The AHCI ones are ok */
- if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE)
- pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
+ pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_ANY_ID, quirk_no_ata_d3);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, PCI_ANY_ID, quirk_no_ata_d3);
+/* Quirk the legacy ATA devices only. The AHCI ones are ok */
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
/* ALi loses some register settings that we cannot then restore */
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, quirk_no_ata_d3);
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
/* VIA comes back fine but we need to keep it alive or ACPI GTM failures
occur when mode detecting */
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_no_ata_d3);
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
/* This was originally an Alpha specific thing, but it really fits here.
* The i82375 PCI/EISA bridge appears as non-classified. Fix that.
--
1.7.7
next prev parent reply other threads:[~2012-02-24 7:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 7:46 [PATCH -v2 00/11] PCI: quirk related clean up Yinghai Lu
2012-02-24 7:46 ` [PATCH 01/11] PCI: Add class support in quirk handling Yinghai Lu
2012-02-24 22:35 ` Jesse Barnes
2012-02-24 7:46 ` [PATCH 02/11] PCI: Use class for quirk for via_no_dac Yinghai Lu
2012-02-24 7:46 ` [PATCH 03/11] PCI: Use class quirk for intel fix_transparent_bridge Yinghai Lu
2012-02-24 7:46 ` [PATCH 04/11] PCI: Use class for quirk for pci_fixup_video Yinghai Lu
2012-02-24 7:46 ` [PATCH 05/11] PCI: Use class for quirk for host bridge mmio_always_on Yinghai Lu
2012-02-24 7:46 ` [PATCH 06/11] PCI: Use class for quirk for cardbus_legacy Yinghai Lu
2012-02-24 7:46 ` Yinghai Lu [this message]
2012-02-24 7:46 ` [PATCH 08/11] PCI: Use class for quirk for netmos class fixup Yinghai Lu
2012-02-24 7:46 ` [PATCH 09/11] PCI: Use class for quirk for intel e100 interrupt fixup Yinghai Lu
2012-02-24 7:46 ` [PATCH 10/11] PCI: Use class for quirk for ti816x class fixup Yinghai Lu
2012-02-24 7:46 ` [PATCH 11/11] PCI: Use class for quirk for usb host controller fixup Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330069619-14446-8-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).