-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPU disable unused PCIe BAR #225
Changes from 1 commit
f59eed4
a199d39
ac3d687
81cec9d
8fa81b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
From 2bc0b2e84866a7733fc05a34bd8a93e165db99cc Mon Sep 17 00:00:00 2001 | ||
From: Madhava Reddy Siddareddygari <msiddare@cisco.com> | ||
Date: Tue, 9 Mar 2021 13:54:28 -0800 | ||
Subject: [PATCH] NPU disable other bars | ||
|
||
This is a port of IOS XR patch | ||
|
||
Spitfire-pacific-disable-all-bars-other-than-0.patch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a git commit hash or URL for this patch. |
||
|
||
to Debian kernel. Modifications from IOS XR: | ||
|
||
a. Only issue an INFO message for changed resources | ||
b. Include the previous resource data in the INFO message | ||
c. Prepare for the possibility of applying patch to | ||
future NPU revisions. | ||
|
||
Original patch message follows: | ||
|
||
For Pacific, only bar 0 is valid. Hence disable all other bars as a work | ||
around for spitfire | ||
|
||
CDETS: CSCvi15029 | ||
|
||
Signed-off-by: Gaurav Gupta <gauragup@cisco.com> | ||
Signed-off-by: Subha Keshavaraj <subkesha@cisco.com> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you just copied the output from |
||
--- | ||
drivers/pci/quirks.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ | ||
1 file changed, 50 insertions(+) | ||
|
||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c | ||
index af2149632..932d219e7 100644 | ||
--- a/drivers/pci/quirks.c | ||
+++ b/drivers/pci/quirks.c | ||
@@ -5462,3 +5462,53 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) | ||
} | ||
DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, | ||
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); | ||
+ | ||
+#define PCI_DEVICE_ID_LEABA_PACIFIC 0xabcd | ||
+#define PCI_DEVICE_ID_LEABA_GIBRALTAR 0xa001 | ||
+#define PCI_DEVICE_ID_LEABA_GRAPHENE 0xa003 | ||
+#define PCI_DEVICE_ID_LEABA_PALLADIUM 0xa004 | ||
+#define PCI_DEVICE_ID_LEABA_ARGON 0xa005 | ||
+#define PCI_DEVICE_ID_LEABA_KRYPTON 0xa006 | ||
msiddare marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
+/* | ||
+ * For Pacific A0, only BAR 0 is valid | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add an errata document name and number for reference. |
||
+ */ | ||
+static void silicon_one_fixup(struct pci_dev *dev) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’d think, the function name needs to include |
||
+{ | ||
+ int i; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not follow the Linux coding style. Please check patches with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, Firefox display issues in the browser. |
||
+ struct resource *r; | ||
+ | ||
+ for (i = 1; i <= PCI_ROM_RESOURCE; i++) { | ||
+ r = &dev->resource[i]; | ||
+ if (!r->start && !r->end && !r->flags) | ||
+ continue; | ||
+ | ||
+ dev_info(&dev->dev, "Cisco Silicon One BAR %d %pR fixed up\n", i, r); | ||
+ r->start = 0; | ||
+ r->end = 0; | ||
+ r->flags = 0; | ||
+ } | ||
+ /* | ||
+ * Pacific device was misbehaving during rescan not enumerating | ||
+ * memory for bar. Due to this HW issue, added this workaround | ||
+ * and verified that during rescan memory gets assigned properly | ||
+ * to the device. This is only a temporary fix. | ||
+ */ | ||
+ dev->class = PCI_CLASS_MEMORY_OTHER << 8; | ||
+ dev_info(&dev->dev, "Cisco Silicon One class adjusted\n"); | ||
+} | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_DEVICE_ID_LEABA_PACIFIC, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_PACIFIC, | ||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_GIBRALTAR, | ||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_GRAPHENE, | ||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_PALLADIUM, | ||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_ARGON, | ||
+ silicon_one_fixup); | ||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_LEABA_KRYPTON, | ||
+ silicon_one_fixup); | ||
+ | ||
-- | ||
2.26.2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also paste the new log messages from one device to the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still open.