From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: "Dexuan Cui" <dexuan.cui@intel.com>,
"Matthew Wilcox" <matthew@wil.cx>,
x86@kernel.org, "Felipe Balbi" <balbi@ti.com>,
"Yu Zhao" <yu.zhao@intel.com>, "Huang Rui" <ray.huang@amd.com>,
"Krzysztof Hałasa" <khalasa@piap.pl>,
"Jason Chang" <jason.chang@amd.com>
Subject: [PATCH 3/6] PCI: Fix TI816X class code quirk
Date: Fri, 19 Jun 2015 17:42:36 -0500 [thread overview]
Message-ID: <20150619224236.14626.87980.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20150619223325.14626.66402.stgit@bhelgaas-glaptop2.roam.corp.google.com>
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: 63c4408074cb ("PCI: Add quirk for setting valid class for TI816X Endpoint")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Hemant Pedanekar <hemantp@ti.com>
---
drivers/pci/quirks.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 64177a6..8bc60c2 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2844,12 +2844,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
static void fixup_ti816x_class(struct pci_dev *dev)
{
+ u32 class = dev->class;
+
/* TI 816x devices do not have class code set when in PCIe boot mode */
- dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
- dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
+ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8;
+ dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n",
+ class, dev->class);
}
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
- PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
+ PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
/* Some PCIe devices do not work reliably with the claimed maximum
* payload size supported.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
next prev parent reply other threads:[~2015-06-19 22:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 22:42 [PATCH 0/6] PCI: Fix class code usage Bjorn Helgaas
2015-06-19 22:42 ` [PATCH 1/6] PCI: Use PCI_CLASS_SERIAL_USB instead of bare number Bjorn Helgaas
2015-06-23 2:07 ` Huang Rui
2015-06-19 22:42 ` [PATCH 2/6] PCI: Fix generic NCR 53c810 class code quirk Bjorn Helgaas
2015-06-19 22:58 ` Bjorn Helgaas
2015-06-19 22:42 ` Bjorn Helgaas [this message]
2015-06-19 22:42 ` [PATCH 4/6] PCI: Fix Intel generic reset quirk class code check Bjorn Helgaas
2015-06-19 23:06 ` Bjorn Helgaas
2015-06-24 20:46 ` Bjorn Helgaas
2015-06-19 22:42 ` [PATCH 5/6] PCI: Simplify reset_intel_generic_dev() Bjorn Helgaas
2015-06-19 22:42 ` [PATCH 6/6] PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes Bjorn Helgaas
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=20150619224236.14626.87980.stgit@bhelgaas-glaptop2.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=balbi@ti.com \
--cc=dexuan.cui@intel.com \
--cc=jason.chang@amd.com \
--cc=khalasa@piap.pl \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=ray.huang@amd.com \
--cc=x86@kernel.org \
--cc=yu.zhao@intel.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;
as well as URLs for NNTP newsgroup(s).