Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F104121943
D32839.id98087.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32839.id98087.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D32839: pci: Implement pci_bar_enabled() for VFs
Attached
Detach File
Event Timeline
Log In to Comment