]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/dcb-setting-pg-will-cause-tx-hang
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / dcb-setting-pg-will-cause-tx-hang
1 Subject: DCB: setting pg will cause tx unit hangs
2 From: Alexander Duyck <alexander.h.duyck@intel.com>
3 References: bnc#438954
4
5 It seems like the configuration may be doing things while the adapter is
6 still up that it shouldn't.
7
8 Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
9 Acked-by: Hannes Reinecke <hare@suse.de>
10 ---
11
12 drivers/net/ixgbe/ixgbe_dcb_nl.c | 16 ++++++++++------
13 1 files changed, 10 insertions(+), 6 deletions(-)
14
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) {
21 return;
22 } else {
23 - if (netdev->flags & IFF_UP)
24 + if (netif_running(netdev))
25 netdev->stop(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))
34 netdev->open(netdev);
35 }
36 } else {
37 /* Turn off DCB */
38 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
39 - if (netdev->flags & IFF_UP)
40 + if (netif_running(netdev))
41 netdev->stop(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))
50 netdev->open(netdev);
51 } else {
52 return;
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))
55 msleep(1);
56
57 + if (netif_running(netdev))
58 + ixgbe_down(adapter);
59 +
60 ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
61 adapter->ring_feature[RING_F_DCB].indices);
62 if (ret) {
63 @@ -345,8 +348,9 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
64 return ret;
65 }
66
67 - ixgbe_down(adapter);
68 - ixgbe_up(adapter);
69 + if (netif_running(netdev))
70 + ixgbe_up(adapter);
71 +
72 adapter->dcb_set_bitmap = 0x00;
73 clear_bit(__IXGBE_RESETTING, &adapter->state);
74 return ret;