Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137536147
D1659.id3412.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
D1659.id3412.diff
View Options
Index: sys/dev/ixl/if_ixl.c
===================================================================
--- sys/dev/ixl/if_ixl.c
+++ sys/dev/ixl/if_ixl.c
@@ -396,6 +396,9 @@
struct ixl_ifx *ifx;
u16 bus;
int error = 0;
+#ifdef PCI_IOV
+ int iov_error;
+#endif
INIT_DEBUGOUT("ixl_attach: begin");
@@ -717,6 +720,16 @@
ifx->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig,
ixl_unregister_vlan, ifx, EVENTHANDLER_PRI_FIRST);
+#ifdef PCI_IOV
+ /* SR-IOV is only supported when MSI-X is in use. */
+ if (pf->msix > 1) {
+ iov_error = pci_iov_attach(dev, NULL, NULL);
+ if (iov_error != 0)
+ device_printf(dev,
+ "Failed to initialize SR-IOV (error=%d)\n",
+ iov_error);
+ }
+#endif
INIT_DEBUGOUT("ixl_attach: end");
return (0);
@@ -753,6 +766,9 @@
struct ixl_ifx *ifx = &pf->ifx;
struct ixl_queue *que = ifx->queues;
i40e_status status;
+#ifdef PCI_IOV
+ int error;
+#endif
INIT_DEBUGOUT("ixl_detach: begin");
@@ -762,6 +778,14 @@
return (EBUSY);
}
+#ifdef PCI_IOV
+ error = pci_iov_detach(dev);
+ if (error != 0) {
+ device_printf(dev, "SR-IOV in use; detach first.\n");
+ return (error);
+ }
+#endif
+
IXL_PF_LOCK(pf);
ixl_stop(pf);
IXL_PF_UNLOCK(pf);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 25, 5:23 AM (25 m, 2 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26102928
Default Alt Text
D1659.id3412.diff (1 KB)
Attached To
Mode
D1659: Register ixl as an SR-IOV-capable driver during attach
Attached
Detach File
Event Timeline
Log In to Comment