diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 8 |
4 files changed, 7 insertions, 23 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 986019b2c849..c7ca7ec065ee 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c | |||
@@ -797,7 +797,7 @@ static int bcm_enet_open(struct net_device *dev) | |||
797 | if (priv->has_phy) { | 797 | if (priv->has_phy) { |
798 | /* connect to PHY */ | 798 | /* connect to PHY */ |
799 | snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, | 799 | snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, |
800 | priv->mac_id ? "1" : "0", priv->phy_id); | 800 | priv->mii_bus->id, priv->phy_id); |
801 | 801 | ||
802 | phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, 0, | 802 | phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, 0, |
803 | PHY_INTERFACE_MODE_MII); | 803 | PHY_INTERFACE_MODE_MII); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 03f3935fd8c2..7aee46983be4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -523,7 +523,6 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, | |||
523 | skb = build_skb(data); | 523 | skb = build_skb(data); |
524 | 524 | ||
525 | if (likely(skb)) { | 525 | if (likely(skb)) { |
526 | |||
527 | #ifdef BNX2X_STOP_ON_ERROR | 526 | #ifdef BNX2X_STOP_ON_ERROR |
528 | if (pad + len > fp->rx_buf_size) { | 527 | if (pad + len > fp->rx_buf_size) { |
529 | BNX2X_ERR("skb_put is about to fail... " | 528 | BNX2X_ERR("skb_put is about to fail... " |
@@ -557,7 +556,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, | |||
557 | 556 | ||
558 | return; | 557 | return; |
559 | } | 558 | } |
560 | 559 | kfree(new_data); | |
561 | drop: | 560 | drop: |
562 | /* drop the packet and keep the buffer in the bin */ | 561 | /* drop the packet and keep the buffer in the bin */ |
563 | DP(NETIF_MSG_RX_STATUS, | 562 | DP(NETIF_MSG_RX_STATUS, |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 1e3f978ee6da..254521319150 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -117,10 +117,6 @@ static int dropless_fc; | |||
117 | module_param(dropless_fc, int, 0); | 117 | module_param(dropless_fc, int, 0); |
118 | MODULE_PARM_DESC(dropless_fc, " Pause on exhausted host ring"); | 118 | MODULE_PARM_DESC(dropless_fc, " Pause on exhausted host ring"); |
119 | 119 | ||
120 | static int poll; | ||
121 | module_param(poll, int, 0); | ||
122 | MODULE_PARM_DESC(poll, " Use polling (for debug)"); | ||
123 | |||
124 | static int mrrs = -1; | 120 | static int mrrs = -1; |
125 | module_param(mrrs, int, 0); | 121 | module_param(mrrs, int, 0); |
126 | MODULE_PARM_DESC(mrrs, " Force Max Read Req Size (0..3) (for debug)"); | 122 | MODULE_PARM_DESC(mrrs, " Force Max Read Req Size (0..3) (for debug)"); |
@@ -4834,20 +4830,11 @@ void bnx2x_drv_pulse(struct bnx2x *bp) | |||
4834 | 4830 | ||
4835 | static void bnx2x_timer(unsigned long data) | 4831 | static void bnx2x_timer(unsigned long data) |
4836 | { | 4832 | { |
4837 | u8 cos; | ||
4838 | struct bnx2x *bp = (struct bnx2x *) data; | 4833 | struct bnx2x *bp = (struct bnx2x *) data; |
4839 | 4834 | ||
4840 | if (!netif_running(bp->dev)) | 4835 | if (!netif_running(bp->dev)) |
4841 | return; | 4836 | return; |
4842 | 4837 | ||
4843 | if (poll) { | ||
4844 | struct bnx2x_fastpath *fp = &bp->fp[0]; | ||
4845 | |||
4846 | for_each_cos_in_tx_queue(fp, cos) | ||
4847 | bnx2x_tx_int(bp, &fp->txdata[cos]); | ||
4848 | bnx2x_rx_int(fp, 1000); | ||
4849 | } | ||
4850 | |||
4851 | if (!BP_NOMCP(bp)) { | 4838 | if (!BP_NOMCP(bp)) { |
4852 | int mb_idx = BP_FW_MB_IDX(bp); | 4839 | int mb_idx = BP_FW_MB_IDX(bp); |
4853 | u32 drv_pulse; | 4840 | u32 drv_pulse; |
@@ -10063,7 +10050,6 @@ static void __devinit bnx2x_set_modes_bitmap(struct bnx2x *bp) | |||
10063 | static int __devinit bnx2x_init_bp(struct bnx2x *bp) | 10050 | static int __devinit bnx2x_init_bp(struct bnx2x *bp) |
10064 | { | 10051 | { |
10065 | int func; | 10052 | int func; |
10066 | int timer_interval; | ||
10067 | int rc; | 10053 | int rc; |
10068 | 10054 | ||
10069 | mutex_init(&bp->port.phy_mutex); | 10055 | mutex_init(&bp->port.phy_mutex); |
@@ -10139,8 +10125,7 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp) | |||
10139 | bp->tx_ticks = (50 / BNX2X_BTR) * BNX2X_BTR; | 10125 | bp->tx_ticks = (50 / BNX2X_BTR) * BNX2X_BTR; |
10140 | bp->rx_ticks = (25 / BNX2X_BTR) * BNX2X_BTR; | 10126 | bp->rx_ticks = (25 / BNX2X_BTR) * BNX2X_BTR; |
10141 | 10127 | ||
10142 | timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ); | 10128 | bp->current_interval = CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ; |
10143 | bp->current_interval = (poll ? poll : timer_interval); | ||
10144 | 10129 | ||
10145 | init_timer(&bp->timer); | 10130 | init_timer(&bp->timer); |
10146 | bp->timer.expires = jiffies + bp->current_interval; | 10131 | bp->timer.expires = jiffies + bp->current_interval; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index bc0121ac291e..1adef266fcd5 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |||
@@ -1081,17 +1081,17 @@ static int bnx2x_storm_stats_update(struct bnx2x *bp) | |||
1081 | estats->rx_stat_ifhcinbadoctets_lo); | 1081 | estats->rx_stat_ifhcinbadoctets_lo); |
1082 | 1082 | ||
1083 | ADD_64(fstats->total_bytes_received_hi, | 1083 | ADD_64(fstats->total_bytes_received_hi, |
1084 | tfunc->rcv_error_bytes.hi, | 1084 | le32_to_cpu(tfunc->rcv_error_bytes.hi), |
1085 | fstats->total_bytes_received_lo, | 1085 | fstats->total_bytes_received_lo, |
1086 | tfunc->rcv_error_bytes.lo); | 1086 | le32_to_cpu(tfunc->rcv_error_bytes.lo)); |
1087 | 1087 | ||
1088 | memcpy(estats, &(fstats->total_bytes_received_hi), | 1088 | memcpy(estats, &(fstats->total_bytes_received_hi), |
1089 | sizeof(struct host_func_stats) - 2*sizeof(u32)); | 1089 | sizeof(struct host_func_stats) - 2*sizeof(u32)); |
1090 | 1090 | ||
1091 | ADD_64(estats->error_bytes_received_hi, | 1091 | ADD_64(estats->error_bytes_received_hi, |
1092 | tfunc->rcv_error_bytes.hi, | 1092 | le32_to_cpu(tfunc->rcv_error_bytes.hi), |
1093 | estats->error_bytes_received_lo, | 1093 | estats->error_bytes_received_lo, |
1094 | tfunc->rcv_error_bytes.lo); | 1094 | le32_to_cpu(tfunc->rcv_error_bytes.lo)); |
1095 | 1095 | ||
1096 | ADD_64(estats->etherstatsoverrsizepkts_hi, | 1096 | ADD_64(estats->etherstatsoverrsizepkts_hi, |
1097 | estats->rx_stat_dot3statsframestoolong_hi, | 1097 | estats->rx_stat_dot3statsframestoolong_hi, |