Commit 94bd7767 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Ben Hutchings

PCI: Fix TI816X class code quirk

commit d1541dc9 upstream.

In fixup_ti816x_class(), we assigned "class = PCI_CLASS_MULTIMEDIA_VIDEO".
But PCI_CLASS_MULTIMEDIA_VIDEO is only the two-byte base class/sub-class
and needs to be shifted to make space for the low-order interface byte.

Shift PCI_CLASS_MULTIMEDIA_VIDEO to set the correct class code.

Fixes: 63c44080 ("PCI: Add quirk for setting valid class for TI816X Endpoint")
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
CC: Hemant Pedanekar <hemantp@ti.com>
[bwh: Backported to 3.2: the class check is done in this function as there
 is no DECLARE_PCI_FIXUP_CLASS_EARLY()]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 38906d3d
...@@ -2875,8 +2875,9 @@ static void __devinit fixup_ti816x_class(struct pci_dev* dev) ...@@ -2875,8 +2875,9 @@ static void __devinit fixup_ti816x_class(struct pci_dev* dev)
{ {
/* TI 816x devices do not have class code set when in PCIe boot mode */ /* TI 816x devices do not have class code set when in PCIe boot mode */
if (dev->class == PCI_CLASS_NOT_DEFINED) { 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 << 8;
dev->class = PCI_CLASS_MULTIMEDIA_VIDEO; dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n",
PCI_CLASS_NOT_DEFINED, dev->class);
} }
} }
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment