]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: negate PHY int mask bits
authorShannon Nelson <shannon.nelson@intel.com>
Mon, 4 Jan 2016 18:33:08 +0000 (10:33 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:37:11 +0000 (08:37 -0800)
Orabug: 22342532

The PHY interrupt mask bits mask out the events we don't want,
so we need to negate the bitmask of events we want.

Change-ID: I273244da5a8d285b6abc84fd68a90f1e6fa0393e
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 2f0aff4151e13fff669b1fab4b93b7613b3b4be5)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 77c4956c62da01797a54c570dfe14de6e698900a..bc99fac5502b6498600b7fd982ec02035dcf8c2c 100644 (file)
@@ -6778,12 +6778,12 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
        if (ret)
                goto end_core_reset;
 
-       /* driver is only interested in link up/down and module qualification
-        * reports from firmware
+       /* The driver only wants link up/down and module qualification
+        * reports from firmware.  Note the negative logic.
         */
        ret = i40e_aq_set_phy_int_mask(&pf->hw,
-                                      I40E_AQ_EVENT_LINK_UPDOWN |
-                                      I40E_AQ_EVENT_MODULE_QUAL_FAIL, NULL);
+                                      ~(I40E_AQ_EVENT_LINK_UPDOWN |
+                                        I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
        if (ret)
                dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",
                         i40e_stat_str(&pf->hw, ret),
@@ -10810,12 +10810,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                }
        }
 
-       /* driver is only interested in link up/down and module qualification
-        * reports from firmware
+       /* The driver only wants link up/down and module qualification
+        * reports from firmware.  Note the negative logic.
         */
        err = i40e_aq_set_phy_int_mask(&pf->hw,
-                                      I40E_AQ_EVENT_LINK_UPDOWN |
-                                      I40E_AQ_EVENT_MODULE_QUAL_FAIL, NULL);
+                                      ~(I40E_AQ_EVENT_LINK_UPDOWN |
+                                        I40E_AQ_EVENT_MODULE_QUAL_FAIL), NULL);
        if (err)
                dev_info(&pf->pdev->dev, "set phy mask fail, err %s aq_err %s\n",
                         i40e_stat_str(&pf->hw, err),