Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136962212
D15461.id43122.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
811 B
Referenced Files
None
Subscribers
None
D15461.id43122.diff
View Options
Index: head/sys/dev/pci/pci_pci.c
===================================================================
--- head/sys/dev/pci/pci_pci.c
+++ head/sys/dev/pci/pci_pci.c
@@ -2545,6 +2545,20 @@
int
pcib_maxslots(device_t dev)
{
+ uint32_t pcie_pos;
+ uint16_t val;
+
+ /*
+ * If this is a PCIe rootport or downstream switch port, there's only
+ * one slot permitted.
+ */
+ if (pci_find_cap(dev, PCIY_EXPRESS, &pcie_pos) == 0) {
+ val = pci_read_config(dev, pcie_pos + PCIER_FLAGS, 2);
+ val &= PCIEM_FLAGS_TYPE;
+ if (val == PCIEM_TYPE_ROOT_PORT ||
+ val == PCIEM_TYPE_DOWNSTREAM_PORT)
+ return (0);
+ }
return (PCI_SLOTMAX);
}
@@ -2558,7 +2572,7 @@
if (sc->flags & PCIB_ENABLE_ARI)
return (PCIE_ARI_SLOTMAX);
else
- return (PCI_SLOTMAX);
+ return (pcib_maxslots(dev));
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 8:38 PM (6 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25799345
Default Alt Text
D15461.id43122.diff (811 B)
Attached To
Mode
D15461: Restrict PCIe maxslots to 0, instead of PCI_SLOTMAX
Attached
Detach File
Event Timeline
Log In to Comment