]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Request PHY media event at reset time
authorShannon Nelson <shannon.nelson@intel.com>
Fri, 18 Mar 2016 19:18:15 +0000 (12:18 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 17:40:56 +0000 (10:40 -0700)
Orabug: 23176970

Add the Media Not Available flag to the link event mask.  It seems
that event comes first if you have a DA cable pulled out, but there's no
follow-up event for Link Down; if you're not looking for MEDIA_NA you will
get no event, even though there's now no Link.

Change-ID: cb3340a2849805bb881f64f6f2ae810eef46eba7
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 867a79e37ed9a3a5a2051cc11df21a57a8a00bfe)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 7595604e59bcf55bbb685573328ad13f9f92cf85..dcd65245e531391657988e1064aba1d16100c0f9 100644 (file)
@@ -6819,6 +6819,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
         */
        ret = i40e_aq_set_phy_int_mask(&pf->hw,
                                       ~(I40E_AQ_EVENT_LINK_UPDOWN |
+                                        I40E_AQ_EVENT_MEDIA_NA |
                                         I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
        if (ret)
                dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",
@@ -10940,6 +10941,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         */
        err = i40e_aq_set_phy_int_mask(&pf->hw,
                                       ~(I40E_AQ_EVENT_LINK_UPDOWN |
+                                        I40E_AQ_EVENT_MEDIA_NA |
                                         I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
        if (err)
                dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",