summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rustad <mark.d.rustad@intel.com>2011-09-20 03:00:22 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-12 22:45:39 -0700
commit15d447ecaff457e6f89b459e70c0770b35b35533 (patch)
treee947e7428e7a97adb1fb2d9f1a25350bdc93e615
parent7b859ebc0a69a7d142f705bd4a8e5720b810f718 (diff)
downloadlinux-15d447ecaff457e6f89b459e70c0770b35b35533.tar.bz2
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>
-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 be66bb679d5a..3631d639d86a 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)
.selector = DCB_APP_IDTYPE_ETHTYPE,
.protocol = ETH_P_FCOE,
};
- u8 up = dcb_getapp(netdev, &app);
+ u8 up;
+
+ /* In IEEE mode, use the IEEE Ethertype selector value */
+ if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) {
+ app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE;
+ up = dcb_ieee_getapp_mask(netdev, &app);
+ } else {
+ up = dcb_getapp(netdev, &app);
+ }
#endif
/* Fail command if not in CEE mode */
@@ -331,7 +339,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
return DCB_NO_HW_CHG;
#ifdef IXGBE_FCOE
- if (up && (up != (1 << adapter->fcoe.up)))
+ if (up && !(up & (1 << adapter->fcoe.up)))
adapter->dcb_set_bitmap |= BIT_APP_UPCHG;
/*