Page MenuHomeFreeBSD

D39310.diff
No OneTemporary

D39310.diff

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

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)

Event Timeline