diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/igbvf/ethtool.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/igbvf/ethtool.c')
-rw-r--r-- | drivers/net/igbvf/ethtool.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/net/igbvf/ethtool.c b/drivers/net/igbvf/ethtool.c index 103b3aa1afc2..b0b14d63dfbf 100644 --- a/drivers/net/igbvf/ethtool.c +++ b/drivers/net/igbvf/ethtool.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel(R) 82576 Virtual Function Linux driver | 3 | Intel(R) 82576 Virtual Function Linux driver |
4 | Copyright(c) 2009 Intel Corporation. | 4 | Copyright(c) 2009 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -90,18 +90,18 @@ static int igbvf_get_settings(struct net_device *netdev, | |||
90 | status = er32(STATUS); | 90 | status = er32(STATUS); |
91 | if (status & E1000_STATUS_LU) { | 91 | if (status & E1000_STATUS_LU) { |
92 | if (status & E1000_STATUS_SPEED_1000) | 92 | if (status & E1000_STATUS_SPEED_1000) |
93 | ecmd->speed = 1000; | 93 | ethtool_cmd_speed_set(ecmd, SPEED_1000); |
94 | else if (status & E1000_STATUS_SPEED_100) | 94 | else if (status & E1000_STATUS_SPEED_100) |
95 | ecmd->speed = 100; | 95 | ethtool_cmd_speed_set(ecmd, SPEED_100); |
96 | else | 96 | else |
97 | ecmd->speed = 10; | 97 | ethtool_cmd_speed_set(ecmd, SPEED_10); |
98 | 98 | ||
99 | if (status & E1000_STATUS_FD) | 99 | if (status & E1000_STATUS_FD) |
100 | ecmd->duplex = DUPLEX_FULL; | 100 | ecmd->duplex = DUPLEX_FULL; |
101 | else | 101 | else |
102 | ecmd->duplex = DUPLEX_HALF; | 102 | ecmd->duplex = DUPLEX_HALF; |
103 | } else { | 103 | } else { |
104 | ecmd->speed = -1; | 104 | ethtool_cmd_speed_set(ecmd, -1); |
105 | ecmd->duplex = -1; | 105 | ecmd->duplex = -1; |
106 | } | 106 | } |
107 | 107 | ||
@@ -110,11 +110,6 @@ static int igbvf_get_settings(struct net_device *netdev, | |||
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | static u32 igbvf_get_link(struct net_device *netdev) | ||
114 | { | ||
115 | return netif_carrier_ok(netdev); | ||
116 | } | ||
117 | |||
118 | static int igbvf_set_settings(struct net_device *netdev, | 113 | static int igbvf_set_settings(struct net_device *netdev, |
119 | struct ethtool_cmd *ecmd) | 114 | struct ethtool_cmd *ecmd) |
120 | { | 115 | { |
@@ -153,7 +148,7 @@ static int igbvf_set_rx_csum(struct net_device *netdev, u32 data) | |||
153 | 148 | ||
154 | static u32 igbvf_get_tx_csum(struct net_device *netdev) | 149 | static u32 igbvf_get_tx_csum(struct net_device *netdev) |
155 | { | 150 | { |
156 | return ((netdev->features & NETIF_F_IP_CSUM) != 0); | 151 | return (netdev->features & NETIF_F_IP_CSUM) != 0; |
157 | } | 152 | } |
158 | 153 | ||
159 | static int igbvf_set_tx_csum(struct net_device *netdev, u32 data) | 154 | static int igbvf_set_tx_csum(struct net_device *netdev, u32 data) |
@@ -206,13 +201,11 @@ static void igbvf_get_regs(struct net_device *netdev, | |||
206 | struct igbvf_adapter *adapter = netdev_priv(netdev); | 201 | struct igbvf_adapter *adapter = netdev_priv(netdev); |
207 | struct e1000_hw *hw = &adapter->hw; | 202 | struct e1000_hw *hw = &adapter->hw; |
208 | u32 *regs_buff = p; | 203 | u32 *regs_buff = p; |
209 | u8 revision_id; | ||
210 | 204 | ||
211 | memset(p, 0, IGBVF_REGS_LEN * sizeof(u32)); | 205 | memset(p, 0, IGBVF_REGS_LEN * sizeof(u32)); |
212 | 206 | ||
213 | pci_read_config_byte(adapter->pdev, PCI_REVISION_ID, &revision_id); | 207 | regs->version = (1 << 24) | (adapter->pdev->revision << 16) | |
214 | 208 | adapter->pdev->device; | |
215 | regs->version = (1 << 24) | (revision_id << 16) | adapter->pdev->device; | ||
216 | 209 | ||
217 | regs_buff[0] = er32(CTRL); | 210 | regs_buff[0] = er32(CTRL); |
218 | regs_buff[1] = er32(STATUS); | 211 | regs_buff[1] = er32(STATUS); |
@@ -398,11 +391,6 @@ static int igbvf_set_wol(struct net_device *netdev, | |||
398 | return -EOPNOTSUPP; | 391 | return -EOPNOTSUPP; |
399 | } | 392 | } |
400 | 393 | ||
401 | static int igbvf_phys_id(struct net_device *netdev, u32 data) | ||
402 | { | ||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | static int igbvf_get_coalesce(struct net_device *netdev, | 394 | static int igbvf_get_coalesce(struct net_device *netdev, |
407 | struct ethtool_coalesce *ec) | 395 | struct ethtool_coalesce *ec) |
408 | { | 396 | { |
@@ -515,7 +503,7 @@ static const struct ethtool_ops igbvf_ethtool_ops = { | |||
515 | .get_msglevel = igbvf_get_msglevel, | 503 | .get_msglevel = igbvf_get_msglevel, |
516 | .set_msglevel = igbvf_set_msglevel, | 504 | .set_msglevel = igbvf_set_msglevel, |
517 | .nway_reset = igbvf_nway_reset, | 505 | .nway_reset = igbvf_nway_reset, |
518 | .get_link = igbvf_get_link, | 506 | .get_link = ethtool_op_get_link, |
519 | .get_eeprom_len = igbvf_get_eeprom_len, | 507 | .get_eeprom_len = igbvf_get_eeprom_len, |
520 | .get_eeprom = igbvf_get_eeprom, | 508 | .get_eeprom = igbvf_get_eeprom, |
521 | .set_eeprom = igbvf_set_eeprom, | 509 | .set_eeprom = igbvf_set_eeprom, |
@@ -534,7 +522,6 @@ static const struct ethtool_ops igbvf_ethtool_ops = { | |||
534 | .self_test = igbvf_diag_test, | 522 | .self_test = igbvf_diag_test, |
535 | .get_sset_count = igbvf_get_sset_count, | 523 | .get_sset_count = igbvf_get_sset_count, |
536 | .get_strings = igbvf_get_strings, | 524 | .get_strings = igbvf_get_strings, |
537 | .phys_id = igbvf_phys_id, | ||
538 | .get_ethtool_stats = igbvf_get_ethtool_stats, | 525 | .get_ethtool_stats = igbvf_get_ethtool_stats, |
539 | .get_coalesce = igbvf_get_coalesce, | 526 | .get_coalesce = igbvf_get_coalesce, |
540 | .set_coalesce = igbvf_set_coalesce, | 527 | .set_coalesce = igbvf_set_coalesce, |