Page MenuHomeFreeBSD

D39310.1794144491.diff
No OneTemporary

Authored By
Unknown
Size
786 B
Referenced Files
None
Subscribers
None

D39310.1794144491.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
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)

Event Timeline