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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 6 Apr 2016 03:33:55 +0000 (20:33 -0700)
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>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 184f3f965a017214b36d3696e359f2a2b3580a94..d2c0106fe71e703bd5b41a9b4469e1629d2fad14 100644 (file)
@@ -6859,6 +6859,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",
@@ -11070,6 +11071,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",