aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index beeb612be98f..49ad60b72657 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -69,8 +69,8 @@
69 69
70#define DRV_MODULE_NAME "tg3" 70#define DRV_MODULE_NAME "tg3"
71#define PFX DRV_MODULE_NAME ": " 71#define PFX DRV_MODULE_NAME ": "
72#define DRV_MODULE_VERSION "3.57" 72#define DRV_MODULE_VERSION "3.58"
73#define DRV_MODULE_RELDATE "Apr 28, 2006" 73#define DRV_MODULE_RELDATE "May 22, 2006"
74 74
75#define TG3_DEF_MAC_MODE 0 75#define TG3_DEF_MAC_MODE 0
76#define TG3_DEF_RX_MODE 0 76#define TG3_DEF_RX_MODE 0
@@ -6488,6 +6488,10 @@ static void tg3_periodic_fetch_stats(struct tg3 *tp)
6488 TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG); 6488 TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG);
6489 TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS); 6489 TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS);
6490 TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE); 6490 TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE);
6491
6492 TG3_STAT_ADD32(&sp->rxbds_empty, RCVLPC_NO_RCV_BD_CNT);
6493 TG3_STAT_ADD32(&sp->rx_discards, RCVLPC_IN_DISCARDS_CNT);
6494 TG3_STAT_ADD32(&sp->rx_errors, RCVLPC_IN_ERRORS_CNT);
6491} 6495}
6492 6496
6493static void tg3_timer(unsigned long __opaque) 6497static void tg3_timer(unsigned long __opaque)
@@ -7653,21 +7657,23 @@ static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
7653 cmd->supported |= (SUPPORTED_1000baseT_Half | 7657 cmd->supported |= (SUPPORTED_1000baseT_Half |
7654 SUPPORTED_1000baseT_Full); 7658 SUPPORTED_1000baseT_Full);
7655 7659
7656 if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES)) 7660 if (!(tp->tg3_flags2 & TG3_FLG2_ANY_SERDES)) {
7657 cmd->supported |= (SUPPORTED_100baseT_Half | 7661 cmd->supported |= (SUPPORTED_100baseT_Half |
7658 SUPPORTED_100baseT_Full | 7662 SUPPORTED_100baseT_Full |
7659 SUPPORTED_10baseT_Half | 7663 SUPPORTED_10baseT_Half |
7660 SUPPORTED_10baseT_Full | 7664 SUPPORTED_10baseT_Full |
7661 SUPPORTED_MII); 7665 SUPPORTED_MII);
7662 else 7666 cmd->port = PORT_TP;
7667 } else {
7663 cmd->supported |= SUPPORTED_FIBRE; 7668 cmd->supported |= SUPPORTED_FIBRE;
7669 cmd->port = PORT_FIBRE;
7670 }
7664 7671
7665 cmd->advertising = tp->link_config.advertising; 7672 cmd->advertising = tp->link_config.advertising;
7666 if (netif_running(dev)) { 7673 if (netif_running(dev)) {
7667 cmd->speed = tp->link_config.active_speed; 7674 cmd->speed = tp->link_config.active_speed;
7668 cmd->duplex = tp->link_config.active_duplex; 7675 cmd->duplex = tp->link_config.active_duplex;
7669 } 7676 }
7670 cmd->port = 0;
7671 cmd->phy_address = PHY_ADDR; 7677 cmd->phy_address = PHY_ADDR;
7672 cmd->transceiver = 0; 7678 cmd->transceiver = 0;
7673 cmd->autoneg = tp->link_config.autoneg; 7679 cmd->autoneg = tp->link_config.autoneg;
@@ -8454,6 +8460,9 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
8454 8460
8455 tx_len = 1514; 8461 tx_len = 1514;
8456 skb = dev_alloc_skb(tx_len); 8462 skb = dev_alloc_skb(tx_len);
8463 if (!skb)
8464 return -ENOMEM;
8465
8457 tx_data = skb_put(skb, tx_len); 8466 tx_data = skb_put(skb, tx_len);
8458 memcpy(tx_data, tp->dev->dev_addr, 6); 8467 memcpy(tx_data, tp->dev->dev_addr, 6);
8459 memset(tx_data + 6, 0x0, 8); 8468 memset(tx_data + 6, 0x0, 8);