ixl(4): Fix reporting of unqualified transceivers
When link_active_on_if_down flag is disabled and link is brought down with ifconfig, FW reports a false positive link event about an unqualified transceiver. The condition used in the driver to filter out those false positive events was incorrect and caused that unqualified module event to also not be reported when the event was valid. Change the condition to rely on IFF_UP flag instead of link_active_on_if_down and bump driver version to 2.3.1-k. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: stallamr@netapp.com, erj@ Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D30733
This commit is contained in:
parent
0e5811a2a9
commit
c4622b01d2
@ -49,7 +49,7 @@
|
||||
*********************************************************************/
|
||||
#define IXL_DRIVER_VERSION_MAJOR 2
|
||||
#define IXL_DRIVER_VERSION_MINOR 3
|
||||
#define IXL_DRIVER_VERSION_BUILD 0
|
||||
#define IXL_DRIVER_VERSION_BUILD 1
|
||||
|
||||
#define IXL_DRIVER_VERSION_STRING \
|
||||
__XSTRING(IXL_DRIVER_VERSION_MAJOR) "." \
|
||||
|
@ -403,20 +403,23 @@ ixl_link_event(struct ixl_pf *pf, struct i40e_arq_event_info *e)
|
||||
{
|
||||
struct i40e_hw *hw = &pf->hw;
|
||||
device_t dev = iflib_get_dev(pf->vsi.ctx);
|
||||
struct i40e_aqc_get_link_status *status =
|
||||
(struct i40e_aqc_get_link_status *)&e->desc.params.raw;
|
||||
struct i40e_link_status *link_info = &hw->phy.link_info;
|
||||
|
||||
/* Request link status from adapter */
|
||||
/* Driver needs to re-enable delivering of link status events
|
||||
* by FW after each event reception. Call i40e_get_link_status
|
||||
* to do that. To not lose information about link state changes,
|
||||
* which happened between receiving an event and the call,
|
||||
* do not rely on status from event but use most recent
|
||||
* status information retrieved by the call. */
|
||||
hw->phy.get_link_info = TRUE;
|
||||
i40e_get_link_status(hw, &pf->link_up);
|
||||
|
||||
/* Print out message if an unqualified module is found */
|
||||
if ((status->link_info & I40E_AQ_MEDIA_AVAILABLE) &&
|
||||
if ((link_info->link_info & I40E_AQ_MEDIA_AVAILABLE) &&
|
||||
(pf->advertised_speed) &&
|
||||
(atomic_load_32(&pf->state) &
|
||||
IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0 &&
|
||||
(!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
|
||||
(!(status->link_info & I40E_AQ_LINK_UP)))
|
||||
(if_getflags(pf->vsi.ifp) & IFF_UP) &&
|
||||
(!(link_info->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
|
||||
(!(link_info->link_info & I40E_AQ_LINK_UP)))
|
||||
device_printf(dev, "Link failed because "
|
||||
"an unqualified module was detected!\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user