1 Subject: DCB: setting pg will cause tx unit hangs
2 From: Alexander Duyck <alexander.h.duyck@intel.com>
5 It seems like the configuration may be doing things while the adapter is
6 still up that it shouldn't.
8 Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
9 Acked-by: Hannes Reinecke <hare@suse.de>
12 drivers/net/ixgbe/ixgbe_dcb_nl.c | 16 ++++++++++------
13 1 files changed, 10 insertions(+), 6 deletions(-)
15 diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
16 index 32d11e5..ca2537e 100644
17 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
18 +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
19 @@ -135,7 +135,7 @@ static void ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
20 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
23 - if (netdev->flags & IFF_UP)
24 + if (netif_running(netdev))
26 ixgbe_reset_interrupt_capability(adapter);
27 ixgbe_napi_del_all(adapter);
28 @@ -149,13 +149,13 @@ static void ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
29 adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
30 ixgbe_init_interrupt_scheme(adapter);
31 ixgbe_napi_add_all(adapter);
32 - if (netdev->flags & IFF_UP)
33 + if (netif_running(netdev))
38 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
39 - if (netdev->flags & IFF_UP)
40 + if (netif_running(netdev))
42 ixgbe_reset_interrupt_capability(adapter);
43 ixgbe_napi_del_all(adapter);
44 @@ -169,7 +169,7 @@ static void ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
45 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
46 ixgbe_init_interrupt_scheme(adapter);
47 ixgbe_napi_add_all(adapter);
48 - if (netdev->flags & IFF_UP)
49 + if (netif_running(netdev))
53 @@ -338,6 +338,9 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
54 while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
57 + if (netif_running(netdev))
58 + ixgbe_down(adapter);
60 ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
61 adapter->ring_feature[RING_F_DCB].indices);
63 @@ -345,8 +348,9 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
67 - ixgbe_down(adapter);
69 + if (netif_running(netdev))
72 adapter->dcb_set_bitmap = 0x00;
73 clear_bit(__IXGBE_RESETTING, &adapter->state);