* [PATCH] pci: Add quirk for setting valid class for TI816X Endpoint
@ 2011-04-05 7:02 Hemant Pedanekar
2011-04-12 16:15 ` Jesse Barnes
0 siblings, 1 reply; 2+ messages in thread
From: Hemant Pedanekar @ 2011-04-05 7:02 UTC (permalink / raw)
To: jbarnes, linux-pci, linux-kernel; +Cc: linux-omap, Hemant Pedanekar
TI816X (common name for DM816x/C6A816x/AM389x family) devices configured to boot
as PCIe Endpoint have class code = 0. This makes kernel PCI bus code to skip
allocating BARs to these devices resulting into following type of error when
trying to enable them:
"Device 0000:01:00.0 not available because of resource collisions"
The device cannot be operated because of the above issue.
This patch adds a ID specific (TI VENDOR ID and 816X DEVICE ID based) 'early'
fixup quirk to replace class code with PCI_CLASS_MULTIMEDIA_VIDEO as class.
Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
---
drivers/pci/quirks.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index bd80f63..a1e4f61 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2784,6 +2784,16 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, vtd_mask_spec_errors);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
#endif
+static void __devinit fixup_ti816x_class(struct pci_dev* dev)
+{
+ /* TI 816x devices do not have class code set when in PCIe boot mode */
+ if (dev->class == PCI_CLASS_NOT_DEFINED) {
+ dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
+ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
+ }
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
+
static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
struct pci_fixup *end)
{
--
1.7.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pci: Add quirk for setting valid class for TI816X Endpoint
2011-04-05 7:02 [PATCH] pci: Add quirk for setting valid class for TI816X Endpoint Hemant Pedanekar
@ 2011-04-12 16:15 ` Jesse Barnes
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2011-04-12 16:15 UTC (permalink / raw)
To: Hemant Pedanekar; +Cc: linux-pci, linux-kernel, linux-omap
On Tue, 5 Apr 2011 12:32:50 +0530
Hemant Pedanekar <hemantp@ti.com> wrote:
> TI816X (common name for DM816x/C6A816x/AM389x family) devices configured to boot
> as PCIe Endpoint have class code = 0. This makes kernel PCI bus code to skip
> allocating BARs to these devices resulting into following type of error when
> trying to enable them:
>
> "Device 0000:01:00.0 not available because of resource collisions"
>
> The device cannot be operated because of the above issue.
>
> This patch adds a ID specific (TI VENDOR ID and 816X DEVICE ID based) 'early'
> fixup quirk to replace class code with PCI_CLASS_MULTIMEDIA_VIDEO as class.
>
> Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
> ---
Applied to my linux-next branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-12 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 7:02 [PATCH] pci: Add quirk for setting valid class for TI816X Endpoint Hemant Pedanekar
2011-04-12 16:15 ` Jesse Barnes
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).