Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_iflib.c
Show First 20 Lines • Show All 397 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
** Run when the Admin Queue gets a link state change interrupt. | ** Run when the Admin Queue gets a link state change interrupt. | ||||
*/ | */ | ||||
void | void | ||||
ixl_link_event(struct ixl_pf *pf, struct i40e_arq_event_info *e) | ixl_link_event(struct ixl_pf *pf, struct i40e_arq_event_info *e) | ||||
{ | { | ||||
struct i40e_hw *hw = &pf->hw; | struct i40e_hw *hw = &pf->hw; | ||||
device_t dev = iflib_get_dev(pf->vsi.ctx); | device_t dev = iflib_get_dev(pf->vsi.ctx); | ||||
struct i40e_aqc_get_link_status *status = | struct i40e_link_status *link_info = &hw->phy.link_info; | ||||
(struct i40e_aqc_get_link_status *)&e->desc.params.raw; | |||||
/* 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; | hw->phy.get_link_info = TRUE; | ||||
i40e_get_link_status(hw, &pf->link_up); | i40e_get_link_status(hw, &pf->link_up); | ||||
/* Print out message if an unqualified module is found */ | /* 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) && | (pf->advertised_speed) && | ||||
(atomic_load_32(&pf->state) & | (if_getflags(pf->vsi.ifp) & IFF_UP) && | ||||
stallamr_netapp.com: This change appears to suppress "unqualified module" message if the link for any reason go down. | |||||
Done Inline ActionsThe IFF_UP flag is controlled by ifconfig and it does not depend on the state of a link reported by FW. When interface is brought up by an user and FW reports link down due to unqualified module the message is going to be reported. krzysztof.galazka_intel.com: The IFF_UP flag is controlled by ifconfig and it does not depend on the state of a link… | |||||
IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0 && | (!(link_info->an_info & I40E_AQ_QUALIFIED_MODULE)) && | ||||
(!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) && | (!(link_info->link_info & I40E_AQ_LINK_UP))) | ||||
(!(status->link_info & I40E_AQ_LINK_UP))) | |||||
device_printf(dev, "Link failed because " | device_printf(dev, "Link failed because " | ||||
"an unqualified module was detected!\n"); | "an unqualified module was detected!\n"); | ||||
/* OS link info is updated elsewhere */ | /* OS link info is updated elsewhere */ | ||||
} | } | ||||
/********************************************************************* | /********************************************************************* | ||||
* | * | ||||
▲ Show 20 Lines • Show All 677 Lines • Show Last 20 Lines |
This change appears to suppress "unqualified module" message if the link for any reason go down.
For instance - admin down vs really an unqualified/unsupported module. If let say, I inserted a SAS cable or FC cable against the port, naturally the link is down but we will loose the ability to advertise "unqualified module" as well.