Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106160441
D39310.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
786 B
Referenced Files
None
Subscribers
None
D39310.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
Fri, Dec 27, 9:29 AM (10 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15613020
Default Alt Text
D39310.diff (786 B)
Attached To
Mode
D39310: bhyve: scan PCI device functions to find host LPC
Attached
Detach File
Event Timeline
Log In to Comment