Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177333964
D39310.1794144491.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
786 B
Referenced Files
None
Subscribers
None
D39310.1794144491.diff
View Options
diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c
--- a/usr.sbin/bhyve/pci_lpc.c
+++ b/usr.sbin/bhyve/pci_lpc.c
@@ -461,10 +461,22 @@
memset(sel, 0, sizeof(*sel));
for (uint8_t slot = 0; slot <= PCI_SLOTMAX; ++slot) {
+ uint8_t max_func = 0;
+
sel->pc_dev = slot;
- if ((read_config(sel, PCIR_CLASS, 1) == PCIC_BRIDGE) &&
- (read_config(sel, PCIR_SUBCLASS, 1) == PCIS_BRIDGE_ISA)) {
- return (0);
+ sel->pc_func = 0;
+
+ if (read_config(sel, PCIR_HDRTYPE, 1) & PCIM_MFDEV)
+ max_func = PCI_FUNCMAX;
+
+ for (uint8_t func = 0; func <= max_func; ++func) {
+ sel->pc_func = func;
+
+ if ((read_config(sel, PCIR_CLASS, 1) == PCIC_BRIDGE) &&
+ (read_config(sel, PCIR_SUBCLASS, 1) ==
+ PCIS_BRIDGE_ISA)) {
+ return (0);
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 1:28 PM (9 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41540202
Default Alt Text
D39310.1794144491.diff (786 B)
Attached To
Mode
D39310: bhyve: scan PCI device functions to find host LPC
Attached
Detach File
Event Timeline