diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index b3a8d24afdd0..c94adec5bc3b 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #define BIT_PG_RX 0x04 | 37 | #define BIT_PG_RX 0x04 |
38 | #define BIT_PG_TX 0x08 | 38 | #define BIT_PG_TX 0x08 |
39 | #define BIT_APP_UPCHG 0x10 | 39 | #define BIT_APP_UPCHG 0x10 |
40 | #define BIT_RESETLINK 0x40 | ||
41 | #define BIT_LINKSPEED 0x80 | 40 | #define BIT_LINKSPEED 0x80 |
42 | 41 | ||
43 | /* Responses for the DCB_C_SET_ALL command */ | 42 | /* Responses for the DCB_C_SET_ALL command */ |
@@ -345,7 +344,6 @@ static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority, | |||
345 | static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | 344 | static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) |
346 | { | 345 | { |
347 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 346 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
348 | bool do_reset; | ||
349 | int ret; | 347 | int ret; |
350 | 348 | ||
351 | if (!adapter->dcb_set_bitmap) | 349 | if (!adapter->dcb_set_bitmap) |
@@ -358,23 +356,17 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
358 | return DCB_NO_HW_CHG; | 356 | return DCB_NO_HW_CHG; |
359 | 357 | ||
360 | /* | 358 | /* |
361 | * Only take down the adapter if the configuration change | 359 | * Only take down the adapter if an app change occured. FCoE |
362 | * requires a reset. | 360 | * may shuffle tx rings in this case and this can not be done |
361 | * without a reset currently. | ||
363 | */ | 362 | */ |
364 | do_reset = adapter->dcb_set_bitmap & (BIT_RESETLINK | BIT_APP_UPCHG); | 363 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { |
365 | |||
366 | if (do_reset) { | ||
367 | while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) | 364 | while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) |
368 | msleep(1); | 365 | msleep(1); |
369 | 366 | ||
370 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { | 367 | if (netif_running(netdev)) |
371 | if (netif_running(netdev)) | 368 | netdev->netdev_ops->ndo_stop(netdev); |
372 | netdev->netdev_ops->ndo_stop(netdev); | 369 | ixgbe_clear_interrupt_scheme(adapter); |
373 | ixgbe_clear_interrupt_scheme(adapter); | ||
374 | } else { | ||
375 | if (netif_running(netdev)) | ||
376 | ixgbe_down(adapter); | ||
377 | } | ||
378 | } | 370 | } |
379 | 371 | ||
380 | if (adapter->dcb_cfg.pfc_mode_enable) { | 372 | if (adapter->dcb_cfg.pfc_mode_enable) { |
@@ -403,15 +395,10 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
403 | } | 395 | } |
404 | } | 396 | } |
405 | 397 | ||
406 | if (do_reset) { | 398 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { |
407 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { | 399 | ixgbe_init_interrupt_scheme(adapter); |
408 | ixgbe_init_interrupt_scheme(adapter); | 400 | if (netif_running(netdev)) |
409 | if (netif_running(netdev)) | 401 | netdev->netdev_ops->ndo_open(netdev); |
410 | netdev->netdev_ops->ndo_open(netdev); | ||
411 | } else { | ||
412 | if (netif_running(netdev)) | ||
413 | ixgbe_up(adapter); | ||
414 | } | ||
415 | ret = DCB_HW_CHG_RST; | 402 | ret = DCB_HW_CHG_RST; |
416 | } | 403 | } |
417 | 404 | ||
@@ -456,7 +443,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
456 | if (adapter->dcb_cfg.pfc_mode_enable) | 443 | if (adapter->dcb_cfg.pfc_mode_enable) |
457 | adapter->hw.fc.current_mode = ixgbe_fc_pfc; | 444 | adapter->hw.fc.current_mode = ixgbe_fc_pfc; |
458 | 445 | ||
459 | if (do_reset) | 446 | if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) |
460 | clear_bit(__IXGBE_RESETTING, &adapter->state); | 447 | clear_bit(__IXGBE_RESETTING, &adapter->state); |
461 | adapter->dcb_set_bitmap = 0x00; | 448 | adapter->dcb_set_bitmap = 0x00; |
462 | return ret; | 449 | return ret; |