diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2012-04-18 18:42:27 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-03 06:04:13 -0400 |
commit | f525c6d29501eb483f2d6f742d2f1dc0452b924d (patch) | |
tree | 236fa0d16d15c700488f772acb5b509cf65616ad /drivers | |
parent | ab6039a70bb559b2fb5f363934da67d864ccda2a (diff) |
ixgbe: dcb: BIT_APP_UPCHG not set by ixgbe_copy_dcb_cfg()
After this commit:
commit aacc1bea190d731755a65cb8ec31dd756f4e263e
Author: Multanen, Eric W <eric.w.multanen@intel.com>
Date: Wed Mar 28 07:49:09 2012 +0000
ixgbe: driver fix for link flap
The BIT_APP_UPCHG bit is no longer set when ixgbe_dcbnl_set_all() is
called. This results in the FCoE app user priority never getting set
and the driver will not configure the tx_rings correctly for FCoE
packets which use the SAN MTU and FCoE offloads.
We resolve this regression by fixing ixgbe_copy_dcb_cfg() to also
check for FCoE application changes. Additionally, we can drop the
IEEE variants of get_dcb_app() because this path is never called
with the IEEE mode enabled.
Signed-off-by: John Fastabend <john.r.fastabend@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')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 43 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 |
3 files changed, 22 insertions, 28 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 74e192107f9..81b15558953 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h | |||
@@ -574,9 +574,6 @@ extern struct ixgbe_info ixgbe_82599_info; | |||
574 | extern struct ixgbe_info ixgbe_X540_info; | 574 | extern struct ixgbe_info ixgbe_X540_info; |
575 | #ifdef CONFIG_IXGBE_DCB | 575 | #ifdef CONFIG_IXGBE_DCB |
576 | extern const struct dcbnl_rtnl_ops dcbnl_ops; | 576 | extern const struct dcbnl_rtnl_ops dcbnl_ops; |
577 | extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, | ||
578 | struct ixgbe_dcb_config *dst_dcb_cfg, | ||
579 | int tc_max); | ||
580 | #endif | 577 | #endif |
581 | 578 | ||
582 | extern char ixgbe_driver_name[]; | 579 | extern char ixgbe_driver_name[]; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index 652e4b09546..32e5c02ff6d 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | |||
@@ -44,18 +44,26 @@ | |||
44 | #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ | 44 | #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ |
45 | #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ | 45 | #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ |
46 | 46 | ||
47 | int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *scfg, | 47 | static int ixgbe_copy_dcb_cfg(struct ixgbe_adapter *adapter, int tc_max) |
48 | struct ixgbe_dcb_config *dcfg, int tc_max) | ||
49 | { | 48 | { |
49 | struct ixgbe_dcb_config *scfg = &adapter->temp_dcb_cfg; | ||
50 | struct ixgbe_dcb_config *dcfg = &adapter->dcb_cfg; | ||
50 | struct tc_configuration *src = NULL; | 51 | struct tc_configuration *src = NULL; |
51 | struct tc_configuration *dst = NULL; | 52 | struct tc_configuration *dst = NULL; |
52 | int i, j; | 53 | int i, j; |
53 | int tx = DCB_TX_CONFIG; | 54 | int tx = DCB_TX_CONFIG; |
54 | int rx = DCB_RX_CONFIG; | 55 | int rx = DCB_RX_CONFIG; |
55 | int changes = 0; | 56 | int changes = 0; |
57 | #ifdef IXGBE_FCOE | ||
58 | struct dcb_app app = { | ||
59 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
60 | .protocol = ETH_P_FCOE, | ||
61 | }; | ||
62 | u8 up = dcb_getapp(adapter->netdev, &app); | ||
56 | 63 | ||
57 | if (!scfg || !dcfg) | 64 | if (up && !(up & (1 << adapter->fcoe.up))) |
58 | return changes; | 65 | changes |= BIT_APP_UPCHG; |
66 | #endif | ||
59 | 67 | ||
60 | for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { | 68 | for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { |
61 | src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; | 69 | src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; |
@@ -332,28 +340,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
332 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 340 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
333 | int ret = DCB_NO_HW_CHG; | 341 | int ret = DCB_NO_HW_CHG; |
334 | int i; | 342 | int i; |
335 | #ifdef IXGBE_FCOE | ||
336 | struct dcb_app app = { | ||
337 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
338 | .protocol = ETH_P_FCOE, | ||
339 | }; | ||
340 | u8 up; | ||
341 | |||
342 | /* In IEEE mode, use the IEEE Ethertype selector value */ | ||
343 | if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) { | ||
344 | app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE; | ||
345 | up = dcb_ieee_getapp_mask(netdev, &app); | ||
346 | } else { | ||
347 | up = dcb_getapp(netdev, &app); | ||
348 | } | ||
349 | #endif | ||
350 | 343 | ||
351 | /* Fail command if not in CEE mode */ | 344 | /* Fail command if not in CEE mode */ |
352 | if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) | 345 | if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) |
353 | return ret; | 346 | return ret; |
354 | 347 | ||
355 | adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, | 348 | adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(adapter, |
356 | &adapter->dcb_cfg, | ||
357 | MAX_TRAFFIC_CLASS); | 349 | MAX_TRAFFIC_CLASS); |
358 | if (!adapter->dcb_set_bitmap) | 350 | if (!adapter->dcb_set_bitmap) |
359 | return ret; | 351 | return ret; |
@@ -440,8 +432,13 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
440 | * FCoE is using changes. This happens if the APP info | 432 | * FCoE is using changes. This happens if the APP info |
441 | * changes or the up2tc mapping is updated. | 433 | * changes or the up2tc mapping is updated. |
442 | */ | 434 | */ |
443 | if ((up && !(up & (1 << adapter->fcoe.up))) || | 435 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { |
444 | (adapter->dcb_set_bitmap & BIT_APP_UPCHG)) { | 436 | struct dcb_app app = { |
437 | .selector = DCB_APP_IDTYPE_ETHTYPE, | ||
438 | .protocol = ETH_P_FCOE, | ||
439 | }; | ||
440 | u8 up = dcb_getapp(netdev, &app); | ||
441 | |||
445 | adapter->fcoe.up = ffs(up) - 1; | 442 | adapter->fcoe.up = ffs(up) - 1; |
446 | ixgbe_dcbnl_devreset(netdev); | 443 | ixgbe_dcbnl_devreset(netdev); |
447 | ret = DCB_HW_CHG_RST; | 444 | ret = DCB_HW_CHG_RST; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index d9dbf871abb..50f0700d250 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -4418,8 +4418,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
4418 | adapter->dcb_cfg.pfc_mode_enable = false; | 4418 | adapter->dcb_cfg.pfc_mode_enable = false; |
4419 | adapter->dcb_set_bitmap = 0x00; | 4419 | adapter->dcb_set_bitmap = 0x00; |
4420 | adapter->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; | 4420 | adapter->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; |
4421 | ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg, | 4421 | memcpy(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, |
4422 | MAX_TRAFFIC_CLASS); | 4422 | sizeof(adapter->temp_dcb_cfg)); |
4423 | 4423 | ||
4424 | #endif | 4424 | #endif |
4425 | 4425 | ||