Page MenuHomeFreeBSD

D32839.id98087.diff
No OneTemporary

D32839.id98087.diff

Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c
+++ sys/dev/pci/pci.c
@@ -3151,6 +3151,16 @@
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) &&
!(pm->pm_value & PCIM_BIOS_ENABLE))
return (0);
+#ifdef PCI_IOV
+ if ((dinfo->cfg.flags & PCICFG_VF) != 0) {
+ struct pcicfg_iov *iov;
+
+ iov = dinfo->cfg.iov;
+ cmd = pci_read_config(iov->iov_pf,
+ iov->iov_pos + PCIR_SRIOV_CTL, 2);
+ return ((cmd & PCIM_SRIOV_VF_MSE) != 0);
+ }
+#endif
cmd = pci_read_config(dev, PCIR_COMMAND, 2);
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) || PCI_BAR_MEM(pm->pm_value))
return ((cmd & PCIM_CMD_MEMEN) != 0);
Index: sys/dev/pci/pci_iov.c
===================================================================
--- sys/dev/pci/pci_iov.c
+++ sys/dev/pci/pci_iov.c
@@ -151,6 +151,7 @@
error = EBUSY;
goto cleanup;
}
+ iov->iov_pf = dev;
iov->iov_pos = iov_pos;
schema = pci_iov_build_schema(&pf_schema, &vf_schema);
Index: sys/dev/pci/pci_iov_private.h
===================================================================
--- sys/dev/pci/pci_iov_private.h
+++ sys/dev/pci/pci_iov_private.h
@@ -37,6 +37,7 @@
};
struct pcicfg_iov {
+ device_t iov_pf;
struct cdev *iov_cdev;
nvlist_t *iov_schema;

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 4, 8:03 PM (9 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15030784
Default Alt Text
D32839.id98087.diff (1 KB)

Event Timeline