Page MenuHomeFreeBSD

D2050.id4186.diff
No OneTemporary

D2050.id4186.diff

Index: sys/dev/ixl/if_ixl.c
===================================================================
--- sys/dev/ixl/if_ixl.c
+++ sys/dev/ixl/if_ixl.c
@@ -210,6 +210,8 @@
static void ixl_reset_vf(struct ixl_pf *pf, struct ixl_vf *vf);
static void ixl_reinit_vf(struct ixl_pf *pf, struct ixl_vf *vf);
+
+static void ixl_broadcast_link_change(struct ixl_pf *);
#endif
/*********************************************************************
@@ -1853,6 +1855,10 @@
device_printf(dev, "The partition detected"
"link speed that is less than 10Gbps\n");
if_link_state_change(ifp, LINK_STATE_UP);
+
+#ifdef PCI_IOV
+ ixl_broadcast_link_change(pf);
+#endif
}
} else { /* Link down */
if (vsi->link_active == TRUE) {
@@ -1860,6 +1866,10 @@
device_printf(dev,"Link is Down\n");
if_link_state_change(ifp, LINK_STATE_DOWN);
vsi->link_active = FALSE;
+
+#ifdef PCI_IOV
+ ixl_broadcast_link_change(pf);
+#endif
}
}
@@ -6389,6 +6399,31 @@
}
}
+static void
+ixl_notify_vf_link_change(struct ixl_pf *pf, struct ixl_vf *vf)
+{
+ struct i40e_virtchnl_pf_event event;
+ struct i40e_hw *hw;
+
+ hw = &pf->hw;
+ event.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE;
+ event.severity = I40E_PF_EVENT_SEVERITY_INFO;
+ event.event_data.link_event.link_status = pf->vsi.link_active;
+ event.event_data.link_event.link_speed = hw->phy.link_info.link_speed;
+
+ ixl_send_vf_msg(pf, vf, I40E_VIRTCHNL_OP_EVENT, I40E_SUCCESS, &event,
+ sizeof(event));
+}
+
+static void
+ixl_broadcast_link_change(struct ixl_pf *pf)
+{
+ int i;
+
+ for (i = 0; i < pf->num_vfs; i++)
+ ixl_notify_vf_link_change(pf, &pf->vfs[i]);
+}
+
/* Handle any VFs that have reset themselves via a Function Level Reset(FLR). */
static void
ixl_handle_vflr(void *arg, int pending)

File Metadata

Mime Type
text/plain
Expires
Thu, May 21, 8:08 PM (8 h, 26 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33403819
Default Alt Text
D2050.id4186.diff (1 KB)

Event Timeline