Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142285231
D1657.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D1657.id.diff
View Options
Index: sys/dev/ixl/if_ixl.c
===================================================================
--- sys/dev/ixl/if_ixl.c
+++ sys/dev/ixl/if_ixl.c
@@ -117,6 +117,7 @@
static int ixl_disable_rings(struct ixl_vsi *);
static void ixl_enable_intr(struct ixl_ifx *);
static void ixl_disable_intr(struct ixl_ifx *);
+static void ixl_disable_rings_intr(struct ixl_vsi *);
static void ixl_enable_adminq(struct i40e_hw *);
static void ixl_disable_adminq(struct i40e_hw *);
@@ -1870,8 +1871,11 @@
mtx_assert(&pf->pf_mtx, MA_OWNED);
INIT_DEBUGOUT("ixl_stop: begin\n");
- ixl_disable_intr(ifx);
- ixl_disable_rings(&ifx->vsi);
+ if (pf->num_vfs == 0)
+ ixl_disable_intr(vsi);
+ else
+ ixl_disable_rings_intr(vsi);
+ ixl_disable_rings(vsi);
/* Tell the stack that the interface is no longer active */
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
@@ -3928,16 +3932,24 @@
}
static void
-ixl_disable_intr(struct ixl_ifx *ifx)
+ixl_disable_rings_intr(struct ixl_vsi *vsi)
{
struct i40e_hw *hw = ifx->hw;
struct ixl_queue *que = ifx->queues;
+ int i;
- if (ixl_enable_msix) {
+ for (i = 0; i < vsi->num_queues; i++, que++)
+ ixl_disable_queue(hw, que->me);
+}
+
+static void
+ixl_disable_intr(struct ixl_vsi *vsi)
+{
+ struct i40e_hw *hw = vsi->hw;
+
+ if (ixl_enable_msix)
ixl_disable_adminq(hw);
- for (int i = 0; i < ifx->vsi.num_queues; i++, que++)
- ixl_disable_queue(hw, que->me);
- } else
+ else
ixl_disable_legacy(hw);
}
@@ -6530,6 +6542,9 @@
goto fail;
}
+ ixl_configure_msix(pf);
+ ixl_enable_adminq(hw);
+
pf->num_vfs = num_vfs;
IXL_PF_UNLOCK(pf);
return (0);
@@ -6546,10 +6561,14 @@
{
struct ixl_pf *pf;
struct i40e_hw *hw;
+ struct ixl_vsi *vsi;
+ struct ifnet *ifp;
int i;
pf = device_get_softc(dev);
hw = &pf->hw;
+ vsi = &pf->vsi;
+ ifp = vsi->ifp;
IXL_PF_LOCK(pf);
for (i = 0; i < pf->num_vfs; i++) {
@@ -6562,6 +6581,9 @@
pf->veb_seid = 0;
}
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0)
+ ixl_disable_intr(vsi);
+
free(pf->vfs, M_IXL);
pf->vfs = NULL;
pf->num_vfs = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 4:29 AM (10 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27730944
Default Alt Text
D1657.id.diff (2 KB)
Attached To
Mode
D1657: Allow VFs to run while the PF is admin down
Attached
Detach File
Event Timeline
Log In to Comment