Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287538
b: refs/heads/master
c: 5facb8e
h: refs/heads/master
v: v3
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Feb 9, 2012
1 parent 3af0654 commit 6665b14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d837ea2b72321ffbdaf83c980923d23ae898baa
refs/heads/master: 5facb8e0c4dc1c8c47b71fd7f376defe16185733
11 changes: 9 additions & 2 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev)
static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
{
u8 err = 0;
u8 prio_tc[MAX_USER_PRIORITY] = {0};
int i;
struct ixgbe_adapter *adapter = netdev_priv(netdev);

/* Fail command if not in CEE mode */
Expand All @@ -122,10 +124,15 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
return err;

if (state > 0)
if (state > 0) {
err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs);
else
ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc);
} else {
err = ixgbe_setup_tc(netdev, 0);
}

for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++)
netdev_set_prio_tc_map(netdev, i, prio_tc[i]);

return err;
}
Expand Down

0 comments on commit 6665b14

Please sign in to comment.