aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-02 16:13:07 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-02 16:13:07 -0500
commit2a6cf35543302e9a5c807eaf13298f510fbdf8f2 (patch)
tree9962e6ef457634905902e5333af72fc078b81c40
parent8ba25dad0ac78850cd46d91186a27d60f7314752 (diff)
parent3f8b4b13785c2737413d3241c21c7c86a41535ef (diff)
Merge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
-rw-r--r--Documentation/networking/bonding.txt16
-rw-r--r--drivers/net/atlx/atl1.c68
-rw-r--r--drivers/net/atlx/atl1.h4
-rw-r--r--drivers/net/atlx/atl2.c63
-rw-r--r--drivers/net/atlx/atl2.h1
-rw-r--r--drivers/net/atlx/atlx.c13
-rw-r--r--drivers/net/forcedeth.c2
-rw-r--r--drivers/net/ixgbe/ixgbe.h1
-rw-r--r--drivers/net/ixgbe/ixgbe_82598.c12
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c27
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c33
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c68
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.h7
-rw-r--r--drivers/net/ixgbe/ixgbe_type.h6
-rw-r--r--drivers/net/smc91x.c2
15 files changed, 219 insertions, 104 deletions
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 688dfe1e6b70..d733a428eff6 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -922,17 +922,19 @@ USERCTL=no
922NETMASK, NETWORK and BROADCAST) to match your network configuration. 922NETMASK, NETWORK and BROADCAST) to match your network configuration.
923 923
924 For later versions of initscripts, such as that found with Fedora 924 For later versions of initscripts, such as that found with Fedora
9257 and Red Hat Enterprise Linux version 5 (or later), it is possible, and, 9257 (or later) and Red Hat Enterprise Linux version 5 (or later), it is possible,
926indeed, preferable, to specify the bonding options in the ifcfg-bond0 926and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
927file, e.g. a line of the format: 927file, e.g. a line of the format:
928 928
929BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=+192.168.1.254" 929BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
930 930
931 will configure the bond with the specified options. The options 931 will configure the bond with the specified options. The options
932specified in BONDING_OPTS are identical to the bonding module parameters 932specified in BONDING_OPTS are identical to the bonding module parameters
933except for the arp_ip_target field. Each target should be included as a 933except for the arp_ip_target field when using versions of initscripts older
934separate option and should be preceded by a '+' to indicate it should be 934than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2). When
935added to the list of queried targets, e.g., 935using older versions each target should be included as a separate option and
936should be preceded by a '+' to indicate it should be added to the list of
937queried targets, e.g.,
936 938
937 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 939 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
938 940
@@ -940,7 +942,7 @@ added to the list of queried targets, e.g.,
940options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or 942options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or
941/etc/modprobe.conf. 943/etc/modprobe.conf.
942 944
943 For older versions of initscripts that do not support 945 For even older versions of initscripts that do not support
944BONDING_OPTS, it is necessary to edit /etc/modules.conf (or 946BONDING_OPTS, it is necessary to edit /etc/modules.conf (or
945/etc/modprobe.conf, depending upon your distro) to load the bonding module 947/etc/modprobe.conf, depending upon your distro) to load the bonding module
946with your desired options when the bond0 interface is brought up. The 948with your desired options when the bond0 interface is brought up. The
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 246d92b42636..3836e625ba58 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1390,7 +1390,8 @@ static u32 atl1_check_link(struct atl1_adapter *adapter)
1390 /* auto-neg, insert timer to re-config phy */ 1390 /* auto-neg, insert timer to re-config phy */
1391 if (!adapter->phy_timer_pending) { 1391 if (!adapter->phy_timer_pending) {
1392 adapter->phy_timer_pending = true; 1392 adapter->phy_timer_pending = true;
1393 mod_timer(&adapter->phy_config_timer, jiffies + 3 * HZ); 1393 mod_timer(&adapter->phy_config_timer,
1394 round_jiffies(jiffies + 3 * HZ));
1394 } 1395 }
1395 1396
1396 return 0; 1397 return 0;
@@ -1662,6 +1663,7 @@ static void atl1_via_workaround(struct atl1_adapter *adapter)
1662 1663
1663static void atl1_inc_smb(struct atl1_adapter *adapter) 1664static void atl1_inc_smb(struct atl1_adapter *adapter)
1664{ 1665{
1666 struct net_device *netdev = adapter->netdev;
1665 struct stats_msg_block *smb = adapter->smb.smb; 1667 struct stats_msg_block *smb = adapter->smb.smb;
1666 1668
1667 /* Fill out the OS statistics structure */ 1669 /* Fill out the OS statistics structure */
@@ -1704,30 +1706,30 @@ static void atl1_inc_smb(struct atl1_adapter *adapter)
1704 adapter->soft_stats.tx_trunc += smb->tx_trunc; 1706 adapter->soft_stats.tx_trunc += smb->tx_trunc;
1705 adapter->soft_stats.tx_pause += smb->tx_pause; 1707 adapter->soft_stats.tx_pause += smb->tx_pause;
1706 1708
1707 adapter->net_stats.rx_packets = adapter->soft_stats.rx_packets; 1709 netdev->stats.rx_packets = adapter->soft_stats.rx_packets;
1708 adapter->net_stats.tx_packets = adapter->soft_stats.tx_packets; 1710 netdev->stats.tx_packets = adapter->soft_stats.tx_packets;
1709 adapter->net_stats.rx_bytes = adapter->soft_stats.rx_bytes; 1711 netdev->stats.rx_bytes = adapter->soft_stats.rx_bytes;
1710 adapter->net_stats.tx_bytes = adapter->soft_stats.tx_bytes; 1712 netdev->stats.tx_bytes = adapter->soft_stats.tx_bytes;
1711 adapter->net_stats.multicast = adapter->soft_stats.multicast; 1713 netdev->stats.multicast = adapter->soft_stats.multicast;
1712 adapter->net_stats.collisions = adapter->soft_stats.collisions; 1714 netdev->stats.collisions = adapter->soft_stats.collisions;
1713 adapter->net_stats.rx_errors = adapter->soft_stats.rx_errors; 1715 netdev->stats.rx_errors = adapter->soft_stats.rx_errors;
1714 adapter->net_stats.rx_over_errors = 1716 netdev->stats.rx_over_errors =
1715 adapter->soft_stats.rx_missed_errors; 1717 adapter->soft_stats.rx_missed_errors;
1716 adapter->net_stats.rx_length_errors = 1718 netdev->stats.rx_length_errors =
1717 adapter->soft_stats.rx_length_errors; 1719 adapter->soft_stats.rx_length_errors;
1718 adapter->net_stats.rx_crc_errors = adapter->soft_stats.rx_crc_errors; 1720 netdev->stats.rx_crc_errors = adapter->soft_stats.rx_crc_errors;
1719 adapter->net_stats.rx_frame_errors = 1721 netdev->stats.rx_frame_errors =
1720 adapter->soft_stats.rx_frame_errors; 1722 adapter->soft_stats.rx_frame_errors;
1721 adapter->net_stats.rx_fifo_errors = adapter->soft_stats.rx_fifo_errors; 1723 netdev->stats.rx_fifo_errors = adapter->soft_stats.rx_fifo_errors;
1722 adapter->net_stats.rx_missed_errors = 1724 netdev->stats.rx_missed_errors =
1723 adapter->soft_stats.rx_missed_errors; 1725 adapter->soft_stats.rx_missed_errors;
1724 adapter->net_stats.tx_errors = adapter->soft_stats.tx_errors; 1726 netdev->stats.tx_errors = adapter->soft_stats.tx_errors;
1725 adapter->net_stats.tx_fifo_errors = adapter->soft_stats.tx_fifo_errors; 1727 netdev->stats.tx_fifo_errors = adapter->soft_stats.tx_fifo_errors;
1726 adapter->net_stats.tx_aborted_errors = 1728 netdev->stats.tx_aborted_errors =
1727 adapter->soft_stats.tx_aborted_errors; 1729 adapter->soft_stats.tx_aborted_errors;
1728 adapter->net_stats.tx_window_errors = 1730 netdev->stats.tx_window_errors =
1729 adapter->soft_stats.tx_window_errors; 1731 adapter->soft_stats.tx_window_errors;
1730 adapter->net_stats.tx_carrier_errors = 1732 netdev->stats.tx_carrier_errors =
1731 adapter->soft_stats.tx_carrier_errors; 1733 adapter->soft_stats.tx_carrier_errors;
1732} 1734}
1733 1735
@@ -1860,7 +1862,7 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
1860 adapter->rx_buffer_len + NET_IP_ALIGN); 1862 adapter->rx_buffer_len + NET_IP_ALIGN);
1861 if (unlikely(!skb)) { 1863 if (unlikely(!skb)) {
1862 /* Better luck next round */ 1864 /* Better luck next round */
1863 adapter->net_stats.rx_dropped++; 1865 adapter->netdev->stats.rx_dropped++;
1864 break; 1866 break;
1865 } 1867 }
1866 1868
@@ -2524,17 +2526,6 @@ static irqreturn_t atl1_intr(int irq, void *data)
2524 return IRQ_HANDLED; 2526 return IRQ_HANDLED;
2525} 2527}
2526 2528
2527/*
2528 * atl1_watchdog - Timer Call-back
2529 * @data: pointer to netdev cast into an unsigned long
2530 */
2531static void atl1_watchdog(unsigned long data)
2532{
2533 struct atl1_adapter *adapter = (struct atl1_adapter *)data;
2534
2535 /* Reset the timer */
2536 mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
2537}
2538 2529
2539/* 2530/*
2540 * atl1_phy_config - Timer Call-back 2531 * atl1_phy_config - Timer Call-back
@@ -2607,7 +2598,6 @@ static s32 atl1_up(struct atl1_adapter *adapter)
2607 if (unlikely(err)) 2598 if (unlikely(err))
2608 goto err_up; 2599 goto err_up;
2609 2600
2610 mod_timer(&adapter->watchdog_timer, jiffies);
2611 atlx_irq_enable(adapter); 2601 atlx_irq_enable(adapter);
2612 atl1_check_link(adapter); 2602 atl1_check_link(adapter);
2613 netif_start_queue(netdev); 2603 netif_start_queue(netdev);
@@ -2625,7 +2615,6 @@ static void atl1_down(struct atl1_adapter *adapter)
2625 struct net_device *netdev = adapter->netdev; 2615 struct net_device *netdev = adapter->netdev;
2626 2616
2627 netif_stop_queue(netdev); 2617 netif_stop_queue(netdev);
2628 del_timer_sync(&adapter->watchdog_timer);
2629 del_timer_sync(&adapter->phy_config_timer); 2618 del_timer_sync(&adapter->phy_config_timer);
2630 adapter->phy_timer_pending = false; 2619 adapter->phy_timer_pending = false;
2631 2620
@@ -2983,7 +2972,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2983 netdev->open = &atl1_open; 2972 netdev->open = &atl1_open;
2984 netdev->stop = &atl1_close; 2973 netdev->stop = &atl1_close;
2985 netdev->hard_start_xmit = &atl1_xmit_frame; 2974 netdev->hard_start_xmit = &atl1_xmit_frame;
2986 netdev->get_stats = &atlx_get_stats; 2975
2987 netdev->set_multicast_list = &atlx_set_multi; 2976 netdev->set_multicast_list = &atlx_set_multi;
2988 netdev->set_mac_address = &atl1_set_mac; 2977 netdev->set_mac_address = &atl1_set_mac;
2989 netdev->change_mtu = &atl1_change_mtu; 2978 netdev->change_mtu = &atl1_change_mtu;
@@ -3049,13 +3038,8 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
3049 netif_carrier_off(netdev); 3038 netif_carrier_off(netdev);
3050 netif_stop_queue(netdev); 3039 netif_stop_queue(netdev);
3051 3040
3052 init_timer(&adapter->watchdog_timer); 3041 setup_timer(&adapter->phy_config_timer, &atl1_phy_config,
3053 adapter->watchdog_timer.function = &atl1_watchdog; 3042 (unsigned long)adapter);
3054 adapter->watchdog_timer.data = (unsigned long)adapter;
3055
3056 init_timer(&adapter->phy_config_timer);
3057 adapter->phy_config_timer.function = &atl1_phy_config;
3058 adapter->phy_config_timer.data = (unsigned long)adapter;
3059 adapter->phy_timer_pending = false; 3043 adapter->phy_timer_pending = false;
3060 3044
3061 INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task); 3045 INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task);
@@ -3173,8 +3157,6 @@ static struct atl1_stats atl1_gstrings_stats[] = {
3173 {"tx_bytes", ATL1_STAT(soft_stats.tx_bytes)}, 3157 {"tx_bytes", ATL1_STAT(soft_stats.tx_bytes)},
3174 {"rx_errors", ATL1_STAT(soft_stats.rx_errors)}, 3158 {"rx_errors", ATL1_STAT(soft_stats.rx_errors)},
3175 {"tx_errors", ATL1_STAT(soft_stats.tx_errors)}, 3159 {"tx_errors", ATL1_STAT(soft_stats.tx_errors)},
3176 {"rx_dropped", ATL1_STAT(net_stats.rx_dropped)},
3177 {"tx_dropped", ATL1_STAT(net_stats.tx_dropped)},
3178 {"multicast", ATL1_STAT(soft_stats.multicast)}, 3160 {"multicast", ATL1_STAT(soft_stats.multicast)},
3179 {"collisions", ATL1_STAT(soft_stats.collisions)}, 3161 {"collisions", ATL1_STAT(soft_stats.collisions)},
3180 {"rx_length_errors", ATL1_STAT(soft_stats.rx_length_errors)}, 3162 {"rx_length_errors", ATL1_STAT(soft_stats.rx_length_errors)},
diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h
index ffa73fc8d95e..146372fd6683 100644
--- a/drivers/net/atlx/atl1.h
+++ b/drivers/net/atlx/atl1.h
@@ -754,7 +754,7 @@ struct atl1_hw {
754struct atl1_adapter { 754struct atl1_adapter {
755 struct net_device *netdev; 755 struct net_device *netdev;
756 struct pci_dev *pdev; 756 struct pci_dev *pdev;
757 struct net_device_stats net_stats; 757
758 struct atl1_sft_stats soft_stats; 758 struct atl1_sft_stats soft_stats;
759 struct vlan_group *vlgrp; 759 struct vlan_group *vlgrp;
760 u32 rx_buffer_len; 760 u32 rx_buffer_len;
@@ -765,7 +765,7 @@ struct atl1_adapter {
765 struct work_struct tx_timeout_task; 765 struct work_struct tx_timeout_task;
766 struct work_struct link_chg_task; 766 struct work_struct link_chg_task;
767 struct work_struct pcie_dma_to_rst_task; 767 struct work_struct pcie_dma_to_rst_task;
768 struct timer_list watchdog_timer; 768
769 struct timer_list phy_config_timer; 769 struct timer_list phy_config_timer;
770 bool phy_timer_pending; 770 bool phy_timer_pending;
771 771
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index f5bdc92c1a65..21ca6dd78b18 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -418,7 +418,7 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
418 * Check that some rx space is free. If not, 418 * Check that some rx space is free. If not,
419 * free one and mark stats->rx_dropped++. 419 * free one and mark stats->rx_dropped++.
420 */ 420 */
421 adapter->net_stats.rx_dropped++; 421 netdev->stats.rx_dropped++;
422 break; 422 break;
423 } 423 }
424 skb_reserve(skb, NET_IP_ALIGN); 424 skb_reserve(skb, NET_IP_ALIGN);
@@ -435,20 +435,20 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
435 } else 435 } else
436#endif 436#endif
437 netif_rx(skb); 437 netif_rx(skb);
438 adapter->net_stats.rx_bytes += rx_size; 438 netdev->stats.rx_bytes += rx_size;
439 adapter->net_stats.rx_packets++; 439 netdev->stats.rx_packets++;
440 netdev->last_rx = jiffies; 440 netdev->last_rx = jiffies;
441 } else { 441 } else {
442 adapter->net_stats.rx_errors++; 442 netdev->stats.rx_errors++;
443 443
444 if (rxd->status.ok && rxd->status.pkt_size <= 60) 444 if (rxd->status.ok && rxd->status.pkt_size <= 60)
445 adapter->net_stats.rx_length_errors++; 445 netdev->stats.rx_length_errors++;
446 if (rxd->status.mcast) 446 if (rxd->status.mcast)
447 adapter->net_stats.multicast++; 447 netdev->stats.multicast++;
448 if (rxd->status.crc) 448 if (rxd->status.crc)
449 adapter->net_stats.rx_crc_errors++; 449 netdev->stats.rx_crc_errors++;
450 if (rxd->status.align) 450 if (rxd->status.align)
451 adapter->net_stats.rx_frame_errors++; 451 netdev->stats.rx_frame_errors++;
452 } 452 }
453 453
454 /* advance write ptr */ 454 /* advance write ptr */
@@ -463,6 +463,7 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
463 463
464static void atl2_intr_tx(struct atl2_adapter *adapter) 464static void atl2_intr_tx(struct atl2_adapter *adapter)
465{ 465{
466 struct net_device *netdev = adapter->netdev;
466 u32 txd_read_ptr; 467 u32 txd_read_ptr;
467 u32 txs_write_ptr; 468 u32 txs_write_ptr;
468 struct tx_pkt_status *txs; 469 struct tx_pkt_status *txs;
@@ -522,20 +523,20 @@ static void atl2_intr_tx(struct atl2_adapter *adapter)
522 523
523 /* tx statistics: */ 524 /* tx statistics: */
524 if (txs->ok) { 525 if (txs->ok) {
525 adapter->net_stats.tx_bytes += txs->pkt_size; 526 netdev->stats.tx_bytes += txs->pkt_size;
526 adapter->net_stats.tx_packets++; 527 netdev->stats.tx_packets++;
527 } 528 }
528 else 529 else
529 adapter->net_stats.tx_errors++; 530 netdev->stats.tx_errors++;
530 531
531 if (txs->defer) 532 if (txs->defer)
532 adapter->net_stats.collisions++; 533 netdev->stats.collisions++;
533 if (txs->abort_col) 534 if (txs->abort_col)
534 adapter->net_stats.tx_aborted_errors++; 535 netdev->stats.tx_aborted_errors++;
535 if (txs->late_col) 536 if (txs->late_col)
536 adapter->net_stats.tx_window_errors++; 537 netdev->stats.tx_window_errors++;
537 if (txs->underun) 538 if (txs->underun)
538 adapter->net_stats.tx_fifo_errors++; 539 netdev->stats.tx_fifo_errors++;
539 } while (1); 540 } while (1);
540 541
541 if (free_hole) { 542 if (free_hole) {
@@ -621,7 +622,7 @@ static irqreturn_t atl2_intr(int irq, void *data)
621 622
622 /* link event */ 623 /* link event */
623 if (status & (ISR_PHY | ISR_MANUAL)) { 624 if (status & (ISR_PHY | ISR_MANUAL)) {
624 adapter->net_stats.tx_carrier_errors++; 625 adapter->netdev->stats.tx_carrier_errors++;
625 atl2_check_for_link(adapter); 626 atl2_check_for_link(adapter);
626 } 627 }
627 628
@@ -723,7 +724,7 @@ static int atl2_open(struct net_device *netdev)
723 724
724 clear_bit(__ATL2_DOWN, &adapter->flags); 725 clear_bit(__ATL2_DOWN, &adapter->flags);
725 726
726 mod_timer(&adapter->watchdog_timer, jiffies + 4*HZ); 727 mod_timer(&adapter->watchdog_timer, round_jiffies(jiffies + 4*HZ));
727 728
728 val = ATL2_READ_REG(&adapter->hw, REG_MASTER_CTRL); 729 val = ATL2_READ_REG(&adapter->hw, REG_MASTER_CTRL);
729 ATL2_WRITE_REG(&adapter->hw, REG_MASTER_CTRL, 730 ATL2_WRITE_REG(&adapter->hw, REG_MASTER_CTRL,
@@ -900,19 +901,6 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
900} 901}
901 902
902/* 903/*
903 * atl2_get_stats - Get System Network Statistics
904 * @netdev: network interface device structure
905 *
906 * Returns the address of the device statistics structure.
907 * The statistics are actually updated from the timer callback.
908 */
909static struct net_device_stats *atl2_get_stats(struct net_device *netdev)
910{
911 struct atl2_adapter *adapter = netdev_priv(netdev);
912 return &adapter->net_stats;
913}
914
915/*
916 * atl2_change_mtu - Change the Maximum Transfer Unit 904 * atl2_change_mtu - Change the Maximum Transfer Unit
917 * @netdev: network interface device structure 905 * @netdev: network interface device structure
918 * @new_mtu: new value for maximum frame size 906 * @new_mtu: new value for maximum frame size
@@ -1050,18 +1038,21 @@ static void atl2_tx_timeout(struct net_device *netdev)
1050static void atl2_watchdog(unsigned long data) 1038static void atl2_watchdog(unsigned long data)
1051{ 1039{
1052 struct atl2_adapter *adapter = (struct atl2_adapter *) data; 1040 struct atl2_adapter *adapter = (struct atl2_adapter *) data;
1053 u32 drop_rxd, drop_rxs;
1054 unsigned long flags;
1055 1041
1056 if (!test_bit(__ATL2_DOWN, &adapter->flags)) { 1042 if (!test_bit(__ATL2_DOWN, &adapter->flags)) {
1043 u32 drop_rxd, drop_rxs;
1044 unsigned long flags;
1045
1057 spin_lock_irqsave(&adapter->stats_lock, flags); 1046 spin_lock_irqsave(&adapter->stats_lock, flags);
1058 drop_rxd = ATL2_READ_REG(&adapter->hw, REG_STS_RXD_OV); 1047 drop_rxd = ATL2_READ_REG(&adapter->hw, REG_STS_RXD_OV);
1059 drop_rxs = ATL2_READ_REG(&adapter->hw, REG_STS_RXS_OV); 1048 drop_rxs = ATL2_READ_REG(&adapter->hw, REG_STS_RXS_OV);
1060 adapter->net_stats.rx_over_errors += (drop_rxd+drop_rxs);
1061 spin_unlock_irqrestore(&adapter->stats_lock, flags); 1049 spin_unlock_irqrestore(&adapter->stats_lock, flags);
1062 1050
1051 adapter->netdev->stats.rx_over_errors += drop_rxd + drop_rxs;
1052
1063 /* Reset the timer */ 1053 /* Reset the timer */
1064 mod_timer(&adapter->watchdog_timer, jiffies + 4 * HZ); 1054 mod_timer(&adapter->watchdog_timer,
1055 round_jiffies(jiffies + 4 * HZ));
1065 } 1056 }
1066} 1057}
1067 1058
@@ -1265,7 +1256,8 @@ static int atl2_check_link(struct atl2_adapter *adapter)
1265 * (if interval smaller than 5 seconds, something strange) */ 1256 * (if interval smaller than 5 seconds, something strange) */
1266 if (!test_bit(__ATL2_DOWN, &adapter->flags)) { 1257 if (!test_bit(__ATL2_DOWN, &adapter->flags)) {
1267 if (!test_and_set_bit(0, &adapter->cfg_phy)) 1258 if (!test_and_set_bit(0, &adapter->cfg_phy))
1268 mod_timer(&adapter->phy_config_timer, jiffies + 5 * HZ); 1259 mod_timer(&adapter->phy_config_timer,
1260 round_jiffies(jiffies + 5 * HZ));
1269 } 1261 }
1270 1262
1271 return 0; 1263 return 0;
@@ -1396,7 +1388,6 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
1396 netdev->open = &atl2_open; 1388 netdev->open = &atl2_open;
1397 netdev->stop = &atl2_close; 1389 netdev->stop = &atl2_close;
1398 netdev->hard_start_xmit = &atl2_xmit_frame; 1390 netdev->hard_start_xmit = &atl2_xmit_frame;
1399 netdev->get_stats = &atl2_get_stats;
1400 netdev->set_multicast_list = &atl2_set_multi; 1391 netdev->set_multicast_list = &atl2_set_multi;
1401 netdev->set_mac_address = &atl2_set_mac; 1392 netdev->set_mac_address = &atl2_set_mac;
1402 netdev->change_mtu = &atl2_change_mtu; 1393 netdev->change_mtu = &atl2_change_mtu;
diff --git a/drivers/net/atlx/atl2.h b/drivers/net/atlx/atl2.h
index 09974df76b18..d918bbe621ea 100644
--- a/drivers/net/atlx/atl2.h
+++ b/drivers/net/atlx/atl2.h
@@ -453,7 +453,6 @@ struct atl2_adapter {
453 /* OS defined structs */ 453 /* OS defined structs */
454 struct net_device *netdev; 454 struct net_device *netdev;
455 struct pci_dev *pdev; 455 struct pci_dev *pdev;
456 struct net_device_stats net_stats;
457#ifdef NETIF_F_HW_VLAN_TX 456#ifdef NETIF_F_HW_VLAN_TX
458 struct vlan_group *vlgrp; 457 struct vlan_group *vlgrp;
459#endif 458#endif
diff --git a/drivers/net/atlx/atlx.c b/drivers/net/atlx/atlx.c
index 3cc9d1089ca1..3dc014215679 100644
--- a/drivers/net/atlx/atlx.c
+++ b/drivers/net/atlx/atlx.c
@@ -182,19 +182,6 @@ static void atlx_clear_phy_int(struct atlx_adapter *adapter)
182} 182}
183 183
184/* 184/*
185 * atlx_get_stats - Get System Network Statistics
186 * @netdev: network interface device structure
187 *
188 * Returns the address of the device statistics structure.
189 * The statistics are actually updated from the timer callback.
190 */
191static struct net_device_stats *atlx_get_stats(struct net_device *netdev)
192{
193 struct atlx_adapter *adapter = netdev_priv(netdev);
194 return &adapter->net_stats;
195}
196
197/*
198 * atlx_tx_timeout - Respond to a Tx Hang 185 * atlx_tx_timeout - Respond to a Tx Hang
199 * @netdev: network interface device structure 186 * @netdev: network interface device structure
200 */ 187 */
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 74c588efa92e..0b12e48d5f37 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -818,7 +818,7 @@ struct fe_priv {
818 * Maximum number of loops until we assume that a bit in the irq mask 818 * Maximum number of loops until we assume that a bit in the irq mask
819 * is stuck. Overridable with module param. 819 * is stuck. Overridable with module param.
820 */ 820 */
821static int max_interrupt_work = 5; 821static int max_interrupt_work = 15;
822 822
823/* 823/*
824 * Optimization can be either throuput mode or cpu mode 824 * Optimization can be either throuput mode or cpu mode
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index e116d340dcc6..132854f646ba 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -267,6 +267,7 @@ struct ixgbe_adapter {
267#define IXGBE_FLAG_RSS_CAPABLE (u32)(1 << 17) 267#define IXGBE_FLAG_RSS_CAPABLE (u32)(1 << 17)
268#define IXGBE_FLAG_VMDQ_CAPABLE (u32)(1 << 18) 268#define IXGBE_FLAG_VMDQ_CAPABLE (u32)(1 << 18)
269#define IXGBE_FLAG_VMDQ_ENABLED (u32)(1 << 19) 269#define IXGBE_FLAG_VMDQ_ENABLED (u32)(1 << 19)
270#define IXGBE_FLAG_FAN_FAIL_CAPABLE (u32)(1 << 20)
270#define IXGBE_FLAG_NEED_LINK_UPDATE (u32)(1 << 22) 271#define IXGBE_FLAG_NEED_LINK_UPDATE (u32)(1 << 22)
271#define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23) 272#define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23)
272 273
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index 7cddcfba809e..c2cdb042c481 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -59,6 +59,11 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
59 59
60 /* PHY Init */ 60 /* PHY Init */
61 switch (phy->type) { 61 switch (phy->type) {
62 case ixgbe_phy_tn:
63 phy->ops.check_link = &ixgbe_check_phy_link_tnx;
64 phy->ops.get_firmware_version =
65 &ixgbe_get_phy_firmware_version_tnx;
66 break;
62 default: 67 default:
63 break; 68 break;
64 } 69 }
@@ -189,6 +194,9 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
189 case IXGBE_DEV_ID_82598EB_XF_LR: 194 case IXGBE_DEV_ID_82598EB_XF_LR:
190 media_type = ixgbe_media_type_fiber; 195 media_type = ixgbe_media_type_fiber;
191 break; 196 break;
197 case IXGBE_DEV_ID_82598AT:
198 media_type = ixgbe_media_type_copper;
199 break;
192 default: 200 default:
193 media_type = ixgbe_media_type_unknown; 201 media_type = ixgbe_media_type_unknown;
194 break; 202 break;
@@ -872,6 +880,10 @@ s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
872 case IXGBE_DEV_ID_82598EB_XF_LR: 880 case IXGBE_DEV_ID_82598EB_XF_LR:
873 physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR; 881 physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR;
874 break; 882 break;
883 case IXGBE_DEV_ID_82598AT:
884 physical_layer = (IXGBE_PHYSICAL_LAYER_10GBASE_T |
885 IXGBE_PHYSICAL_LAYER_1000BASE_T);
886 break;
875 887
876 default: 888 default:
877 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN; 889 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 81a9c4b86726..fee56a383819 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -149,6 +149,8 @@ static int ixgbe_set_settings(struct net_device *netdev,
149{ 149{
150 struct ixgbe_adapter *adapter = netdev_priv(netdev); 150 struct ixgbe_adapter *adapter = netdev_priv(netdev);
151 struct ixgbe_hw *hw = &adapter->hw; 151 struct ixgbe_hw *hw = &adapter->hw;
152 u32 advertised, old;
153 s32 err;
152 154
153 switch (hw->phy.media_type) { 155 switch (hw->phy.media_type) {
154 case ixgbe_media_type_fiber: 156 case ixgbe_media_type_fiber:
@@ -157,6 +159,31 @@ static int ixgbe_set_settings(struct net_device *netdev,
157 return -EINVAL; 159 return -EINVAL;
158 /* in this case we currently only support 10Gb/FULL */ 160 /* in this case we currently only support 10Gb/FULL */
159 break; 161 break;
162 case ixgbe_media_type_copper:
163 /* 10000/copper and 1000/copper must autoneg
164 * this function does not support any duplex forcing, but can
165 * limit the advertising of the adapter to only 10000 or 1000 */
166 if (ecmd->autoneg == AUTONEG_DISABLE)
167 return -EINVAL;
168
169 old = hw->phy.autoneg_advertised;
170 advertised = 0;
171 if (ecmd->advertising & ADVERTISED_10000baseT_Full)
172 advertised |= IXGBE_LINK_SPEED_10GB_FULL;
173
174 if (ecmd->advertising & ADVERTISED_1000baseT_Full)
175 advertised |= IXGBE_LINK_SPEED_1GB_FULL;
176
177 if (old == advertised)
178 break;
179 /* this sets the link speed and restarts auto-neg */
180 err = hw->mac.ops.setup_link_speed(hw, advertised, true, true);
181 if (err) {
182 DPRINTK(PROBE, INFO,
183 "setup link failed with code %d\n", err);
184 hw->mac.ops.setup_link_speed(hw, old, true, true);
185 }
186 break;
160 default: 187 default:
161 break; 188 break;
162 } 189 }
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 028bfb20412c..2a12e97d5efe 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -68,6 +68,8 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
68 board_82598 }, 68 board_82598 },
69 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT), 69 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT),
70 board_82598 }, 70 board_82598 },
71 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT),
72 board_82598 },
71 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), 73 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4),
72 board_82598 }, 74 board_82598 },
73 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), 75 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT),
@@ -904,6 +906,17 @@ static void ixgbe_set_itr_msix(struct ixgbe_q_vector *q_vector)
904 return; 906 return;
905} 907}
906 908
909static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr)
910{
911 struct ixgbe_hw *hw = &adapter->hw;
912
913 if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) &&
914 (eicr & IXGBE_EICR_GPI_SDP1)) {
915 DPRINTK(PROBE, CRIT, "Fan has stopped, replace the adapter\n");
916 /* write to clear the interrupt */
917 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
918 }
919}
907 920
908static void ixgbe_check_lsc(struct ixgbe_adapter *adapter) 921static void ixgbe_check_lsc(struct ixgbe_adapter *adapter)
909{ 922{
@@ -928,6 +941,8 @@ static irqreturn_t ixgbe_msix_lsc(int irq, void *data)
928 if (eicr & IXGBE_EICR_LSC) 941 if (eicr & IXGBE_EICR_LSC)
929 ixgbe_check_lsc(adapter); 942 ixgbe_check_lsc(adapter);
930 943
944 ixgbe_check_fan_failure(adapter, eicr);
945
931 if (!test_bit(__IXGBE_DOWN, &adapter->state)) 946 if (!test_bit(__IXGBE_DOWN, &adapter->state))
932 IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER); 947 IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
933 948
@@ -1316,6 +1331,8 @@ static irqreturn_t ixgbe_intr(int irq, void *data)
1316 if (eicr & IXGBE_EICR_LSC) 1331 if (eicr & IXGBE_EICR_LSC)
1317 ixgbe_check_lsc(adapter); 1332 ixgbe_check_lsc(adapter);
1318 1333
1334 ixgbe_check_fan_failure(adapter, eicr);
1335
1319 if (netif_rx_schedule_prep(netdev, &adapter->q_vector[0].napi)) { 1336 if (netif_rx_schedule_prep(netdev, &adapter->q_vector[0].napi)) {
1320 adapter->tx_ring[0].total_packets = 0; 1337 adapter->tx_ring[0].total_packets = 0;
1321 adapter->tx_ring[0].total_bytes = 0; 1338 adapter->tx_ring[0].total_bytes = 0;
@@ -1418,6 +1435,8 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
1418{ 1435{
1419 u32 mask; 1436 u32 mask;
1420 mask = IXGBE_EIMS_ENABLE_MASK; 1437 mask = IXGBE_EIMS_ENABLE_MASK;
1438 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE)
1439 mask |= IXGBE_EIMS_GPI_SDP1;
1421 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); 1440 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
1422 IXGBE_WRITE_FLUSH(&adapter->hw); 1441 IXGBE_WRITE_FLUSH(&adapter->hw);
1423} 1442}
@@ -1927,6 +1946,13 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
1927 IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); 1946 IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE);
1928 } 1947 }
1929 1948
1949 /* Enable fan failure interrupt if media type is copper */
1950 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
1951 gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
1952 gpie |= IXGBE_SDP1_GPIEN;
1953 IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie);
1954 }
1955
1930 mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); 1956 mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD);
1931 if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) { 1957 if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) {
1932 mhadd &= ~IXGBE_MHADD_MFS_MASK; 1958 mhadd &= ~IXGBE_MHADD_MFS_MASK;
@@ -2564,6 +2590,9 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
2564 rss = min(IXGBE_MAX_RSS_INDICES, (int)num_online_cpus()); 2590 rss = min(IXGBE_MAX_RSS_INDICES, (int)num_online_cpus());
2565 adapter->ring_feature[RING_F_RSS].indices = rss; 2591 adapter->ring_feature[RING_F_RSS].indices = rss;
2566 adapter->flags |= IXGBE_FLAG_RSS_ENABLED; 2592 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
2593 if (hw->mac.ops.get_media_type &&
2594 (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper))
2595 adapter->flags |= IXGBE_FLAG_FAN_FAIL_CAPABLE;
2567 2596
2568 /* default flow control settings */ 2597 /* default flow control settings */
2569 hw->fc.original_type = ixgbe_fc_none; 2598 hw->fc.original_type = ixgbe_fc_none;
@@ -3691,6 +3720,10 @@ static int ixgbe_link_config(struct ixgbe_hw *hw)
3691 /* must always autoneg for both 1G and 10G link */ 3720 /* must always autoneg for both 1G and 10G link */
3692 hw->mac.autoneg = true; 3721 hw->mac.autoneg = true;
3693 3722
3723 if ((hw->mac.type == ixgbe_mac_82598EB) &&
3724 (hw->phy.media_type == ixgbe_media_type_copper))
3725 autoneg = IXGBE_LINK_SPEED_82598_AUTONEG;
3726
3694 return hw->mac.ops.setup_link_speed(hw, autoneg, true, true); 3727 return hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
3695} 3728}
3696 3729
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index 764035a8c9a1..981e6d849592 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -121,6 +121,9 @@ static enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
121 enum ixgbe_phy_type phy_type; 121 enum ixgbe_phy_type phy_type;
122 122
123 switch (phy_id) { 123 switch (phy_id) {
124 case TN1010_PHY_ID:
125 phy_type = ixgbe_phy_tn;
126 break;
124 case QT2022_PHY_ID: 127 case QT2022_PHY_ID:
125 phy_type = ixgbe_phy_qt; 128 phy_type = ixgbe_phy_qt;
126 break; 129 break;
@@ -426,3 +429,68 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
426 return 0; 429 return 0;
427} 430}
428 431
432/**
433 * ixgbe_check_phy_link_tnx - Determine link and speed status
434 * @hw: pointer to hardware structure
435 *
436 * Reads the VS1 register to determine if link is up and the current speed for
437 * the PHY.
438 **/
439s32 ixgbe_check_phy_link_tnx(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
440 bool *link_up)
441{
442 s32 status = 0;
443 u32 time_out;
444 u32 max_time_out = 10;
445 u16 phy_link = 0;
446 u16 phy_speed = 0;
447 u16 phy_data = 0;
448
449 /* Initialize speed and link to default case */
450 *link_up = false;
451 *speed = IXGBE_LINK_SPEED_10GB_FULL;
452
453 /*
454 * Check current speed and link status of the PHY register.
455 * This is a vendor specific register and may have to
456 * be changed for other copper PHYs.
457 */
458 for (time_out = 0; time_out < max_time_out; time_out++) {
459 udelay(10);
460 status = hw->phy.ops.read_reg(hw,
461 IXGBE_MDIO_VENDOR_SPECIFIC_1_STATUS,
462 IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
463 &phy_data);
464 phy_link = phy_data &
465 IXGBE_MDIO_VENDOR_SPECIFIC_1_LINK_STATUS;
466 phy_speed = phy_data &
467 IXGBE_MDIO_VENDOR_SPECIFIC_1_SPEED_STATUS;
468 if (phy_link == IXGBE_MDIO_VENDOR_SPECIFIC_1_LINK_STATUS) {
469 *link_up = true;
470 if (phy_speed ==
471 IXGBE_MDIO_VENDOR_SPECIFIC_1_SPEED_STATUS)
472 *speed = IXGBE_LINK_SPEED_1GB_FULL;
473 break;
474 }
475 }
476
477 return status;
478}
479
480/**
481 * ixgbe_get_phy_firmware_version_tnx - Gets the PHY Firmware Version
482 * @hw: pointer to hardware structure
483 * @firmware_version: pointer to the PHY Firmware Version
484 **/
485s32 ixgbe_get_phy_firmware_version_tnx(struct ixgbe_hw *hw,
486 u16 *firmware_version)
487{
488 s32 status = 0;
489
490 status = hw->phy.ops.read_reg(hw, TNX_FW_REV,
491 IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
492 firmware_version);
493
494 return status;
495}
496
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h
index 9bfe3f2b1d8f..5cc063d02770 100644
--- a/drivers/net/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ixgbe/ixgbe_phy.h
@@ -77,4 +77,11 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
77 bool autoneg, 77 bool autoneg,
78 bool autoneg_wait_to_complete); 78 bool autoneg_wait_to_complete);
79 79
80/* PHY specific */
81s32 ixgbe_check_phy_link_tnx(struct ixgbe_hw *hw,
82 ixgbe_link_speed *speed,
83 bool *link_up);
84s32 ixgbe_get_phy_firmware_version_tnx(struct ixgbe_hw *hw,
85 u16 *firmware_version);
86
80#endif /* _IXGBE_PHY_H_ */ 87#endif /* _IXGBE_PHY_H_ */
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index c6f8fa1c4e59..51df39dae816 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -36,6 +36,7 @@
36/* Device IDs */ 36/* Device IDs */
37#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 37#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6
38#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 38#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7
39#define IXGBE_DEV_ID_82598AT 0x10C8
39#define IXGBE_DEV_ID_82598EB_CX4 0x10DD 40#define IXGBE_DEV_ID_82598EB_CX4 0x10DD
40#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC 41#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC
41#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 42#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4
@@ -488,6 +489,8 @@
488#define IXGBE_MAX_PHY_ADDR 32 489#define IXGBE_MAX_PHY_ADDR 32
489 490
490/* PHY IDs*/ 491/* PHY IDs*/
492#define TN1010_PHY_ID 0x00A19410
493#define TNX_FW_REV 0xB
491#define QT2022_PHY_ID 0x0043A400 494#define QT2022_PHY_ID 0x0043A400
492 495
493/* PHY Types */ 496/* PHY Types */
@@ -1202,6 +1205,7 @@ enum ixgbe_mac_type {
1202 1205
1203enum ixgbe_phy_type { 1206enum ixgbe_phy_type {
1204 ixgbe_phy_unknown = 0, 1207 ixgbe_phy_unknown = 0,
1208 ixgbe_phy_tn,
1205 ixgbe_phy_qt, 1209 ixgbe_phy_qt,
1206 ixgbe_phy_xaui, 1210 ixgbe_phy_xaui,
1207 ixgbe_phy_tw_tyco, 1211 ixgbe_phy_tw_tyco,
@@ -1396,6 +1400,8 @@ struct ixgbe_phy_operations {
1396 s32 (*setup_link)(struct ixgbe_hw *); 1400 s32 (*setup_link)(struct ixgbe_hw *);
1397 s32 (*setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool, 1401 s32 (*setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool,
1398 bool); 1402 bool);
1403 s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *);
1404 s32 (*get_firmware_version)(struct ixgbe_hw *, u16 *);
1399 s32 (*read_i2c_byte)(struct ixgbe_hw *, u8, u8, u8 *); 1405 s32 (*read_i2c_byte)(struct ixgbe_hw *, u8, u8, u8 *);
1400 s32 (*write_i2c_byte)(struct ixgbe_hw *, u8, u8, u8); 1406 s32 (*write_i2c_byte)(struct ixgbe_hw *, u8, u8, u8);
1401 s32 (*read_i2c_eeprom)(struct ixgbe_hw *, u8 , u8 *); 1407 s32 (*read_i2c_eeprom)(struct ixgbe_hw *, u8 , u8 *);
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 2d8bfa7bd9e9..b5ff63268d89 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2123,7 +2123,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device *
2123 * 0 --> there is a device 2123 * 0 --> there is a device
2124 * anything else, error 2124 * anything else, error
2125 */ 2125 */
2126static int smc_drv_probe(struct platform_device *pdev) 2126static int __init smc_drv_probe(struct platform_device *pdev)
2127{ 2127{
2128 struct smc91x_platdata *pd = pdev->dev.platform_data; 2128 struct smc91x_platdata *pd = pdev->dev.platform_data;
2129 struct smc_local *lp; 2129 struct smc_local *lp;