mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabe Black <gabe.black@ni.com>
To: jbarnes@virtuousgeek.org
Cc: shawn.bohrer@ni.com, mike.hoogendyk@ni.com, knan@anduin.net,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	arjan@infradead.org, Gabe Black <gabe.black@ni.com>
Subject: [PATCH] TI XIO200a bridge quirk: erroneously reports support for fast b2b transfers
Date: Tue, 6 Oct 2009 09:19:45 -0500	[thread overview]
Message-ID: <1254838785-10254-1-git-send-email-gabe.black@ni.com> (raw)
In-Reply-To: <8a15eb2b0910060432m3c062776md718ea19baf19a3f@mail.gmail.com>

This quirk will disable fast back to back transfer on the secondary bus
segment of the TI Bridge.

Signed-off-by: Gabe Black <gabe.black@ni.com>
---
 drivers/pci/quirks.c    |   19 +++++++++++++++++++
 include/linux/pci_ids.h |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6099fac..efa6534 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -670,6 +670,25 @@ static void __devinit quirk_vt8235_acpi(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8235,	quirk_vt8235_acpi);
 
+/*
+ * TI XIO2000a PCIe-PCI Bridge erroneously reports it supports fast back-to-back:
+ *	Disable fast back-to-back on the secondary bus segment
+ */
+static void __devinit quirk_xio2000a(struct pci_dev *dev)
+{
+	struct pci_dev *pdev;
+	u16 command;
+
+	dev_warn(&dev->dev, "TI XIO2000a quirk detected; "
+		"secondary bus fast back-to-back transfers disabled\n");
+	list_for_each_entry(pdev, &dev->subordinate->devices, bus_list) {
+		pci_read_config_word(pdev, PCI_COMMAND, &command);
+		if (command & PCI_COMMAND_FAST_BACK)
+			pci_write_config_word(pdev, PCI_COMMAND, command & ~PCI_COMMAND_FAST_BACK);
+	}
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XIO2000A,
+			quirk_xio2000a);
 
 #ifdef CONFIG_X86_IO_APIC 
 
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index da1fda8..f490e7a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -776,6 +776,7 @@
 #define PCI_DEVICE_ID_TI_X515		0x8036
 #define PCI_DEVICE_ID_TI_XX12		0x8039
 #define PCI_DEVICE_ID_TI_XX12_FM	0x803b
+#define PCI_DEVICE_ID_TI_XIO2000A	0x8231
 #define PCI_DEVICE_ID_TI_1130		0xac12
 #define PCI_DEVICE_ID_TI_1031		0xac13
 #define PCI_DEVICE_ID_TI_1131		0xac15
-- 
1.6.0.4


  reply	other threads:[~2009-10-06 14:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 19:01 TI PCIe-PCI bridge quirks Gabe Black
2009-09-22 19:11 ` Arjan van de Ven
2009-09-22 19:37   ` Gabe Black
2009-09-22 20:07     ` Arjan van de Ven
2009-10-06  0:09       ` Jesse Barnes
2009-10-06 11:32         ` Gabe Black
2009-10-06 14:19           ` Gabe Black [this message]
2009-10-06 16:11             ` [PATCH] TI XIO200a bridge quirk: erroneously reports support for fast b2b transfers Jesse Barnes

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=1254838785-10254-1-git-send-email-gabe.black@ni.com \
    --to=gabe.black@ni.com \
    --cc=arjan@infradead.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=knan@anduin.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mike.hoogendyk@ni.com \
    --cc=shawn.bohrer@ni.com \
    /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

all inboxes | Powered by JetHome®