Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290534
b: refs/heads/master
c: 793734b
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker committed Mar 3, 2012
1 parent 7f12557 commit f4572ed
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 34 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: 2b88f2de30510c0f4e623d3cd5fcd85cdb70b51f
refs/heads/master: 793734b587a670e47a8d65f9e5211ba2188bb904
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
return rval;
}

static int bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num)
static u8 bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num)
{
struct bnx2x *bp = netdev_priv(netdev);
u8 rval = 0;
Expand All @@ -2169,7 +2169,7 @@ static int bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num)
return rval;
}

static int bnx2x_dcbnl_set_numtcs(struct net_device *netdev, int tcid, u8 num)
static u8 bnx2x_dcbnl_set_numtcs(struct net_device *netdev, int tcid, u8 num)
{
struct bnx2x *bp = netdev_priv(netdev);
DP(NETIF_MSG_LINK, "num tcs = %d; Not supported\n", num);
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/ethernet/intel/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ struct nic {
u32 rx_fc_pause;
u32 rx_fc_unsupported;
u32 rx_tco_frames;
u32 rx_short_frame_errors;
u32 rx_over_length_errors;

u16 eeprom_wc;
Expand Down Expand Up @@ -1623,9 +1622,7 @@ static void e100_update_stats(struct nic *nic)
ns->collisions += nic->tx_collisions;
ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
le32_to_cpu(s->tx_lost_crs);
nic->rx_short_frame_errors +=
le32_to_cpu(s->rx_short_frame_errors);
ns->rx_length_errors = nic->rx_short_frame_errors +
ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) +
nic->rx_over_length_errors;
ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);
Expand Down Expand Up @@ -2661,7 +2658,6 @@ static const char e100_gstrings_stats[][ETH_GSTRING_LEN] = {
"tx_deferred", "tx_single_collisions", "tx_multi_collisions",
"tx_flow_control_pause", "rx_flow_control_pause",
"rx_flow_control_unsupported", "tx_tco_packets", "rx_tco_packets",
"rx_short_frame_errors", "rx_over_length_errors",
};
#define E100_NET_STATS_LEN 21
#define E100_STATS_LEN ARRAY_SIZE(e100_gstrings_stats)
Expand Down Expand Up @@ -2695,8 +2691,6 @@ static void e100_get_ethtool_stats(struct net_device *netdev,
data[i++] = nic->rx_fc_unsupported;
data[i++] = nic->tx_tco_frames;
data[i++] = nic->rx_tco_frames;
data[i++] = nic->rx_short_frame_errors;
data[i++] = nic->rx_over_length_errors;
}

static void e100_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
Expand Down
30 changes: 10 additions & 20 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev)

static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
{
int err = 0;
u8 err = 0;
u8 prio_tc[MAX_USER_PRIORITY] = {0};
int i;
struct ixgbe_adapter *adapter = netdev_priv(netdev);
Expand All @@ -122,7 +122,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)

/* verify there is something to do, if not then exit */
if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
goto out;
return err;

if (state > 0) {
err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs);
Expand All @@ -131,14 +131,10 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
err = ixgbe_setup_tc(netdev, 0);
}

if (err)
goto out;

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

out:
return err ? 1 : 0;
return err;
}

static void ixgbe_dcbnl_get_perm_hw_addr(struct net_device *netdev,
Expand Down Expand Up @@ -490,7 +486,7 @@ static u8 ixgbe_dcbnl_getcap(struct net_device *netdev, int capid, u8 *cap)
return 0;
}

static int ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
static u8 ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
u8 rval = 0;
Expand All @@ -514,7 +510,7 @@ static int ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
return rval;
}

static int ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
static u8 ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
{
return -EINVAL;
}
Expand Down Expand Up @@ -585,7 +581,7 @@ static int ixgbe_dcbnl_ieee_setets(struct net_device *dev,
{
struct ixgbe_adapter *adapter = netdev_priv(dev);
int max_frame = dev->mtu + ETH_HLEN + ETH_FCS_LEN;
int i, err = 0;
int i;
__u8 max_tc = 0;

if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))
Expand All @@ -612,17 +608,12 @@ static int ixgbe_dcbnl_ieee_setets(struct net_device *dev,
return -EINVAL;

if (max_tc != netdev_get_num_tc(dev))
err = ixgbe_setup_tc(dev, max_tc);

if (err)
goto err_out;
ixgbe_setup_tc(dev, max_tc);

for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++)
netdev_set_prio_tc_map(dev, i, ets->prio_tc[i]);

err = ixgbe_dcb_hw_ets(&adapter->hw, ets, max_frame);
err_out:
return err;
return ixgbe_dcb_hw_ets(&adapter->hw, ets, max_frame);
}

static int ixgbe_dcbnl_ieee_getpfc(struct net_device *dev,
Expand Down Expand Up @@ -735,7 +726,6 @@ static u8 ixgbe_dcbnl_setdcbx(struct net_device *dev, u8 mode)
struct ixgbe_adapter *adapter = netdev_priv(dev);
struct ieee_ets ets = {0};
struct ieee_pfc pfc = {0};
int err = 0;

/* no support for LLD_MANAGED modes or CEE+IEEE */
if ((mode & DCB_CAP_DCBX_LLD_MANAGED) ||
Expand Down Expand Up @@ -766,10 +756,10 @@ static u8 ixgbe_dcbnl_setdcbx(struct net_device *dev, u8 mode)
*/
ixgbe_dcbnl_ieee_setets(dev, &ets);
ixgbe_dcbnl_ieee_setpfc(dev, &pfc);
err = ixgbe_setup_tc(dev, 0);
ixgbe_setup_tc(dev, 0);
}

return err ? 1 : 0;
return 0;
}

const struct dcbnl_rtnl_ops dcbnl_ops = {
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/net/dcbnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ struct dcbnl_rtnl_ops {
void (*getpfccfg)(struct net_device *, int, u8 *);
u8 (*setall)(struct net_device *);
u8 (*getcap)(struct net_device *, int, u8 *);
int (*getnumtcs)(struct net_device *, int, u8 *);
int (*setnumtcs)(struct net_device *, int, u8);
u8 (*getnumtcs)(struct net_device *, int, u8 *);
u8 (*setnumtcs)(struct net_device *, int, u8);
u8 (*getpfcstate)(struct net_device *);
void (*setpfcstate)(struct net_device *, u8);
void (*getbcncfg)(struct net_device *, int, u32 *);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static void ccid3_update_send_interval(struct ccid3_hc_tx_sock *hc)
{
hc->tx_t_ipi = scaled_div32(((u64)hc->tx_s) << 6, hc->tx_x);

DCCP_BUG_ON(hc->tx_t_ipi == 0);
ccid3_pr_debug("t_ipi=%u, s=%u, X=%u\n", hc->tx_t_ipi,
hc->tx_s, (unsigned)(hc->tx_x >> 6));
}
Expand Down Expand Up @@ -236,8 +237,6 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
*
* Note that X_recv is scaled by 2^6 while X_calc is not
*/
BUG_ON(hc->tx_p && !hc->tx_x_calc);

if (hc->tx_x_calc > (hc->tx_x_recv >> 5))
hc->tx_x_recv =
max(hc->tx_x_recv / 2,
Expand Down

0 comments on commit f4572ed

Please sign in to comment.