aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
diff options
context:
space:
mode:
authorMark Rustad <mark.d.rustad@intel.com>2011-09-19 23:00:22 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-13 01:45:39 -0400
commit15d447ecaff457e6f89b459e70c0770b35b35533 (patch)
treee947e7428e7a97adb1fb2d9f1a25350bdc93e615 /drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
parent7b859ebc0a69a7d142f705bd4a8e5720b810f718 (diff)
ixgbe: Correct check for change in FCoE priority
Correct a check for change in FCoE priority when IEEE mode DCB is in use. In IEEE mode a different function has to be used to get the FCoE priority mask. Also, the check for the mask assumed that only one priority was set. In case there should be more than one, check just the bit. These changes help avoid link flapping issues that can come up when IEEE DCB is in use. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
index be66bb679d5..3631d639d86 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
@@ -318,7 +318,15 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
318 .selector = DCB_APP_IDTYPE_ETHTYPE, 318 .selector = DCB_APP_IDTYPE_ETHTYPE,
319 .protocol = ETH_P_FCOE, 319 .protocol = ETH_P_FCOE,
320 }; 320 };
321 u8 up = dcb_getapp(netdev, &app); 321 u8 up;
322
323 /* In IEEE mode, use the IEEE Ethertype selector value */
324 if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) {
325 app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE;
326 up = dcb_ieee_getapp_mask(netdev, &app);
327 } else {
328 up = dcb_getapp(netdev, &app);
329 }
322#endif 330#endif
323 331
324 /* Fail command if not in CEE mode */ 332 /* Fail command if not in CEE mode */
@@ -331,7 +339,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
331 return DCB_NO_HW_CHG; 339 return DCB_NO_HW_CHG;
332 340
333#ifdef IXGBE_FCOE 341#ifdef IXGBE_FCOE
334 if (up && (up != (1 << adapter->fcoe.up))) 342 if (up && !(up & (1 << adapter->fcoe.up)))
335 adapter->dcb_set_bitmap |= BIT_APP_UPCHG; 343 adapter->dcb_set_bitmap |= BIT_APP_UPCHG;
336 344
337 /* 345 /*