diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 17:38:20 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 17:38:20 -0400 |
commit | c592c761a36286ab83451daa37a21c8558ea99c0 (patch) | |
tree | 8abf57708fabf2a915320e9515b1ae2730ebf499 /drivers/net/ethernet/intel/ixgbe | |
parent | 63236f4038f7e14762114606d95769c32cf6cac1 (diff) | |
parent | 33499df88b711725ee473ab5478e17efd21de4b0 (diff) |
Merge remote-tracking branch 'regulator/topic/stub' into regulator-next
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe')
25 files changed, 120 insertions, 91 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/Makefile b/drivers/net/ethernet/intel/ixgbe/Makefile index 7d7387fbdecd..7a16177a12a5 100644 --- a/drivers/net/ethernet/intel/ixgbe/Makefile +++ b/drivers/net/ethernet/intel/ixgbe/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # Intel 10 Gigabit PCI Express Linux driver | 3 | # Intel 10 Gigabit PCI Express Linux driver |
4 | # Copyright(c) 1999 - 2010 Intel Corporation. | 4 | # Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 258164d6d45a..e6aeb64105a4 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c index ef2afefb0cd4..b406c367b190 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c index 772072147bea..4e59083a3de2 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index a3aa6333073f..383b9413292e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h index 863f9c1f145b..2c834c46bba1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -75,7 +75,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, | |||
75 | s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); | 75 | s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); |
76 | s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); | 76 | s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); |
77 | s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); | 77 | s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); |
78 | s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packtetbuf_num); | 78 | s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packetbuf_num); |
79 | s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw); | 79 | s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw); |
80 | 80 | ||
81 | s32 ixgbe_validate_mac_addr(u8 *mac_addr); | 81 | s32 ixgbe_validate_mac_addr(u8 *mac_addr); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c index 318caf4bf623..8bfaaee5ac5b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h index e162775064da..24333b718166 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c index fcd0e479721f..d3695edfcb8b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h index 2f318935561a..ba835708fcac 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c index 32cd97bc794d..888a419dc3d9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h index a59d5dc59d04..4dec47faeb00 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index da31735311f1..79a92fe987b9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -112,6 +112,8 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev) | |||
112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | 112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) |
113 | { | 113 | { |
114 | u8 err = 0; | 114 | u8 err = 0; |
115 | u8 prio_tc[MAX_USER_PRIORITY] = {0}; | ||
116 | int i; | ||
115 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 117 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
116 | 118 | ||
117 | /* Fail command if not in CEE mode */ | 119 | /* Fail command if not in CEE mode */ |
@@ -122,10 +124,15 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
122 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) | 124 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) |
123 | return err; | 125 | return err; |
124 | 126 | ||
125 | if (state > 0) | 127 | if (state > 0) { |
126 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); | 128 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); |
127 | else | 129 | ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc); |
130 | } else { | ||
128 | err = ixgbe_setup_tc(netdev, 0); | 131 | err = ixgbe_setup_tc(netdev, 0); |
132 | } | ||
133 | |||
134 | for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) | ||
135 | netdev_set_prio_tc_map(netdev, i, prio_tc[i]); | ||
129 | 136 | ||
130 | return err; | 137 | return err; |
131 | } | 138 | } |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index da7e580f517a..a62975480e37 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -58,7 +58,7 @@ struct ixgbe_stats { | |||
58 | sizeof(((struct rtnl_link_stats64 *)0)->m), \ | 58 | sizeof(((struct rtnl_link_stats64 *)0)->m), \ |
59 | offsetof(struct rtnl_link_stats64, m) | 59 | offsetof(struct rtnl_link_stats64, m) |
60 | 60 | ||
61 | static struct ixgbe_stats ixgbe_gstrings_stats[] = { | 61 | static const struct ixgbe_stats ixgbe_gstrings_stats[] = { |
62 | {"rx_packets", IXGBE_NETDEV_STAT(rx_packets)}, | 62 | {"rx_packets", IXGBE_NETDEV_STAT(rx_packets)}, |
63 | {"tx_packets", IXGBE_NETDEV_STAT(tx_packets)}, | 63 | {"tx_packets", IXGBE_NETDEV_STAT(tx_packets)}, |
64 | {"rx_bytes", IXGBE_NETDEV_STAT(rx_bytes)}, | 64 | {"rx_bytes", IXGBE_NETDEV_STAT(rx_bytes)}, |
@@ -120,19 +120,23 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { | |||
120 | #endif /* IXGBE_FCOE */ | 120 | #endif /* IXGBE_FCOE */ |
121 | }; | 121 | }; |
122 | 122 | ||
123 | #define IXGBE_QUEUE_STATS_LEN \ | 123 | /* ixgbe allocates num_tx_queues and num_rx_queues symmetrically so |
124 | ((((struct ixgbe_adapter *)netdev_priv(netdev))->num_tx_queues + \ | 124 | * we set the num_rx_queues to evaluate to num_tx_queues. This is |
125 | ((struct ixgbe_adapter *)netdev_priv(netdev))->num_rx_queues) * \ | 125 | * used because we do not have a good way to get the max number of |
126 | * rx queues with CONFIG_RPS disabled. | ||
127 | */ | ||
128 | #define IXGBE_NUM_RX_QUEUES netdev->num_tx_queues | ||
129 | |||
130 | #define IXGBE_QUEUE_STATS_LEN ( \ | ||
131 | (netdev->num_tx_queues + IXGBE_NUM_RX_QUEUES) * \ | ||
126 | (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) | 132 | (sizeof(struct ixgbe_queue_stats) / sizeof(u64))) |
127 | #define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) | 133 | #define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) |
128 | #define IXGBE_PB_STATS_LEN ( \ | 134 | #define IXGBE_PB_STATS_LEN ( \ |
129 | (((struct ixgbe_adapter *)netdev_priv(netdev))->flags & \ | 135 | (sizeof(((struct ixgbe_adapter *)0)->stats.pxonrxc) + \ |
130 | IXGBE_FLAG_DCB_ENABLED) ? \ | 136 | sizeof(((struct ixgbe_adapter *)0)->stats.pxontxc) + \ |
131 | (sizeof(((struct ixgbe_adapter *)0)->stats.pxonrxc) + \ | 137 | sizeof(((struct ixgbe_adapter *)0)->stats.pxoffrxc) + \ |
132 | sizeof(((struct ixgbe_adapter *)0)->stats.pxontxc) + \ | 138 | sizeof(((struct ixgbe_adapter *)0)->stats.pxofftxc)) \ |
133 | sizeof(((struct ixgbe_adapter *)0)->stats.pxoffrxc) + \ | 139 | / sizeof(u64)) |
134 | sizeof(((struct ixgbe_adapter *)0)->stats.pxofftxc)) \ | ||
135 | / sizeof(u64) : 0) | ||
136 | #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + \ | 140 | #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + \ |
137 | IXGBE_PB_STATS_LEN + \ | 141 | IXGBE_PB_STATS_LEN + \ |
138 | IXGBE_QUEUE_STATS_LEN) | 142 | IXGBE_QUEUE_STATS_LEN) |
@@ -1078,8 +1082,15 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
1078 | data[i] = (ixgbe_gstrings_stats[i].sizeof_stat == | 1082 | data[i] = (ixgbe_gstrings_stats[i].sizeof_stat == |
1079 | sizeof(u64)) ? *(u64 *)p : *(u32 *)p; | 1083 | sizeof(u64)) ? *(u64 *)p : *(u32 *)p; |
1080 | } | 1084 | } |
1081 | for (j = 0; j < adapter->num_tx_queues; j++) { | 1085 | for (j = 0; j < IXGBE_NUM_RX_QUEUES; j++) { |
1082 | ring = adapter->tx_ring[j]; | 1086 | ring = adapter->tx_ring[j]; |
1087 | if (!ring) { | ||
1088 | data[i] = 0; | ||
1089 | data[i+1] = 0; | ||
1090 | i += 2; | ||
1091 | continue; | ||
1092 | } | ||
1093 | |||
1083 | do { | 1094 | do { |
1084 | start = u64_stats_fetch_begin_bh(&ring->syncp); | 1095 | start = u64_stats_fetch_begin_bh(&ring->syncp); |
1085 | data[i] = ring->stats.packets; | 1096 | data[i] = ring->stats.packets; |
@@ -1087,8 +1098,15 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
1087 | } while (u64_stats_fetch_retry_bh(&ring->syncp, start)); | 1098 | } while (u64_stats_fetch_retry_bh(&ring->syncp, start)); |
1088 | i += 2; | 1099 | i += 2; |
1089 | } | 1100 | } |
1090 | for (j = 0; j < adapter->num_rx_queues; j++) { | 1101 | for (j = 0; j < IXGBE_NUM_RX_QUEUES; j++) { |
1091 | ring = adapter->rx_ring[j]; | 1102 | ring = adapter->rx_ring[j]; |
1103 | if (!ring) { | ||
1104 | data[i] = 0; | ||
1105 | data[i+1] = 0; | ||
1106 | i += 2; | ||
1107 | continue; | ||
1108 | } | ||
1109 | |||
1092 | do { | 1110 | do { |
1093 | start = u64_stats_fetch_begin_bh(&ring->syncp); | 1111 | start = u64_stats_fetch_begin_bh(&ring->syncp); |
1094 | data[i] = ring->stats.packets; | 1112 | data[i] = ring->stats.packets; |
@@ -1096,22 +1114,20 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
1096 | } while (u64_stats_fetch_retry_bh(&ring->syncp, start)); | 1114 | } while (u64_stats_fetch_retry_bh(&ring->syncp, start)); |
1097 | i += 2; | 1115 | i += 2; |
1098 | } | 1116 | } |
1099 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 1117 | |
1100 | for (j = 0; j < MAX_TX_PACKET_BUFFERS; j++) { | 1118 | for (j = 0; j < IXGBE_MAX_PACKET_BUFFERS; j++) { |
1101 | data[i++] = adapter->stats.pxontxc[j]; | 1119 | data[i++] = adapter->stats.pxontxc[j]; |
1102 | data[i++] = adapter->stats.pxofftxc[j]; | 1120 | data[i++] = adapter->stats.pxofftxc[j]; |
1103 | } | 1121 | } |
1104 | for (j = 0; j < MAX_RX_PACKET_BUFFERS; j++) { | 1122 | for (j = 0; j < IXGBE_MAX_PACKET_BUFFERS; j++) { |
1105 | data[i++] = adapter->stats.pxonrxc[j]; | 1123 | data[i++] = adapter->stats.pxonrxc[j]; |
1106 | data[i++] = adapter->stats.pxoffrxc[j]; | 1124 | data[i++] = adapter->stats.pxoffrxc[j]; |
1107 | } | ||
1108 | } | 1125 | } |
1109 | } | 1126 | } |
1110 | 1127 | ||
1111 | static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, | 1128 | static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, |
1112 | u8 *data) | 1129 | u8 *data) |
1113 | { | 1130 | { |
1114 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
1115 | char *p = (char *)data; | 1131 | char *p = (char *)data; |
1116 | int i; | 1132 | int i; |
1117 | 1133 | ||
@@ -1126,31 +1142,29 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, | |||
1126 | ETH_GSTRING_LEN); | 1142 | ETH_GSTRING_LEN); |
1127 | p += ETH_GSTRING_LEN; | 1143 | p += ETH_GSTRING_LEN; |
1128 | } | 1144 | } |
1129 | for (i = 0; i < adapter->num_tx_queues; i++) { | 1145 | for (i = 0; i < netdev->num_tx_queues; i++) { |
1130 | sprintf(p, "tx_queue_%u_packets", i); | 1146 | sprintf(p, "tx_queue_%u_packets", i); |
1131 | p += ETH_GSTRING_LEN; | 1147 | p += ETH_GSTRING_LEN; |
1132 | sprintf(p, "tx_queue_%u_bytes", i); | 1148 | sprintf(p, "tx_queue_%u_bytes", i); |
1133 | p += ETH_GSTRING_LEN; | 1149 | p += ETH_GSTRING_LEN; |
1134 | } | 1150 | } |
1135 | for (i = 0; i < adapter->num_rx_queues; i++) { | 1151 | for (i = 0; i < IXGBE_NUM_RX_QUEUES; i++) { |
1136 | sprintf(p, "rx_queue_%u_packets", i); | 1152 | sprintf(p, "rx_queue_%u_packets", i); |
1137 | p += ETH_GSTRING_LEN; | 1153 | p += ETH_GSTRING_LEN; |
1138 | sprintf(p, "rx_queue_%u_bytes", i); | 1154 | sprintf(p, "rx_queue_%u_bytes", i); |
1139 | p += ETH_GSTRING_LEN; | 1155 | p += ETH_GSTRING_LEN; |
1140 | } | 1156 | } |
1141 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 1157 | for (i = 0; i < IXGBE_MAX_PACKET_BUFFERS; i++) { |
1142 | for (i = 0; i < MAX_TX_PACKET_BUFFERS; i++) { | 1158 | sprintf(p, "tx_pb_%u_pxon", i); |
1143 | sprintf(p, "tx_pb_%u_pxon", i); | 1159 | p += ETH_GSTRING_LEN; |
1144 | p += ETH_GSTRING_LEN; | 1160 | sprintf(p, "tx_pb_%u_pxoff", i); |
1145 | sprintf(p, "tx_pb_%u_pxoff", i); | 1161 | p += ETH_GSTRING_LEN; |
1146 | p += ETH_GSTRING_LEN; | 1162 | } |
1147 | } | 1163 | for (i = 0; i < IXGBE_MAX_PACKET_BUFFERS; i++) { |
1148 | for (i = 0; i < MAX_RX_PACKET_BUFFERS; i++) { | 1164 | sprintf(p, "rx_pb_%u_pxon", i); |
1149 | sprintf(p, "rx_pb_%u_pxon", i); | 1165 | p += ETH_GSTRING_LEN; |
1150 | p += ETH_GSTRING_LEN; | 1166 | sprintf(p, "rx_pb_%u_pxoff", i); |
1151 | sprintf(p, "rx_pb_%u_pxoff", i); | 1167 | p += ETH_GSTRING_LEN; |
1152 | p += ETH_GSTRING_LEN; | ||
1153 | } | ||
1154 | } | 1168 | } |
1155 | /* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */ | 1169 | /* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */ |
1156 | break; | 1170 | break; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c index d18d6157dd2c..4bc794249801 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h index 261fd62dda18..1dbed17c8107 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1ee5d0fbb905..3dc6cef58107 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -64,7 +64,7 @@ char ixgbe_default_device_descr[] = | |||
64 | __stringify(BUILD) "-k" | 64 | __stringify(BUILD) "-k" |
65 | const char ixgbe_driver_version[] = DRV_VERSION; | 65 | const char ixgbe_driver_version[] = DRV_VERSION; |
66 | static const char ixgbe_copyright[] = | 66 | static const char ixgbe_copyright[] = |
67 | "Copyright (c) 1999-2011 Intel Corporation."; | 67 | "Copyright (c) 1999-2012 Intel Corporation."; |
68 | 68 | ||
69 | static const struct ixgbe_info *ixgbe_info_tbl[] = { | 69 | static const struct ixgbe_info *ixgbe_info_tbl[] = { |
70 | [board_82598] = &ixgbe_82598_info, | 70 | [board_82598] = &ixgbe_82598_info, |
@@ -2633,22 +2633,22 @@ static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, | |||
2633 | /* | 2633 | /* |
2634 | * we must limit the number of descriptors so that the | 2634 | * we must limit the number of descriptors so that the |
2635 | * total size of max desc * buf_len is not greater | 2635 | * total size of max desc * buf_len is not greater |
2636 | * than 65535 | 2636 | * than 65536 |
2637 | */ | 2637 | */ |
2638 | if (ring_is_ps_enabled(ring)) { | 2638 | if (ring_is_ps_enabled(ring)) { |
2639 | #if (MAX_SKB_FRAGS > 16) | 2639 | #if (PAGE_SIZE < 8192) |
2640 | rscctrl |= IXGBE_RSCCTL_MAXDESC_16; | 2640 | rscctrl |= IXGBE_RSCCTL_MAXDESC_16; |
2641 | #elif (MAX_SKB_FRAGS > 8) | 2641 | #elif (PAGE_SIZE < 16384) |
2642 | rscctrl |= IXGBE_RSCCTL_MAXDESC_8; | 2642 | rscctrl |= IXGBE_RSCCTL_MAXDESC_8; |
2643 | #elif (MAX_SKB_FRAGS > 4) | 2643 | #elif (PAGE_SIZE < 32768) |
2644 | rscctrl |= IXGBE_RSCCTL_MAXDESC_4; | 2644 | rscctrl |= IXGBE_RSCCTL_MAXDESC_4; |
2645 | #else | 2645 | #else |
2646 | rscctrl |= IXGBE_RSCCTL_MAXDESC_1; | 2646 | rscctrl |= IXGBE_RSCCTL_MAXDESC_1; |
2647 | #endif | 2647 | #endif |
2648 | } else { | 2648 | } else { |
2649 | if (rx_buf_len < IXGBE_RXBUFFER_4K) | 2649 | if (rx_buf_len <= IXGBE_RXBUFFER_4K) |
2650 | rscctrl |= IXGBE_RSCCTL_MAXDESC_16; | 2650 | rscctrl |= IXGBE_RSCCTL_MAXDESC_16; |
2651 | else if (rx_buf_len < IXGBE_RXBUFFER_8K) | 2651 | else if (rx_buf_len <= IXGBE_RXBUFFER_8K) |
2652 | rscctrl |= IXGBE_RSCCTL_MAXDESC_8; | 2652 | rscctrl |= IXGBE_RSCCTL_MAXDESC_8; |
2653 | else | 2653 | else |
2654 | rscctrl |= IXGBE_RSCCTL_MAXDESC_4; | 2654 | rscctrl |= IXGBE_RSCCTL_MAXDESC_4; |
@@ -2830,7 +2830,7 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter) | |||
2830 | IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl | vt_reg_bits); | 2830 | IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl | vt_reg_bits); |
2831 | 2831 | ||
2832 | vf_shift = adapter->num_vfs % 32; | 2832 | vf_shift = adapter->num_vfs % 32; |
2833 | reg_offset = (adapter->num_vfs > 32) ? 1 : 0; | 2833 | reg_offset = (adapter->num_vfs >= 32) ? 1 : 0; |
2834 | 2834 | ||
2835 | /* Enable only the PF's pool for Tx/Rx */ | 2835 | /* Enable only the PF's pool for Tx/Rx */ |
2836 | IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift)); | 2836 | IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift)); |
@@ -4330,6 +4330,10 @@ static int ixgbe_set_num_queues(struct ixgbe_adapter *adapter) | |||
4330 | adapter->num_tx_queues = 1; | 4330 | adapter->num_tx_queues = 1; |
4331 | 4331 | ||
4332 | done: | 4332 | done: |
4333 | if ((adapter->netdev->reg_state == NETREG_UNREGISTERED) || | ||
4334 | (adapter->netdev->reg_state == NETREG_UNREGISTERING)) | ||
4335 | return 0; | ||
4336 | |||
4333 | /* Notify the stack of the (possibly) reduced queue counts. */ | 4337 | /* Notify the stack of the (possibly) reduced queue counts. */ |
4334 | netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); | 4338 | netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); |
4335 | return netif_set_real_num_rx_queues(adapter->netdev, | 4339 | return netif_set_real_num_rx_queues(adapter->netdev, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c index 3f725d48336d..1f3e32b576a5 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h index b239bdac38da..310bdd961075 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index 7cf1e1f56c69..b91773551a38 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h index 197bdd13106a..cc18165b4c05 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index cf6812dd1436..b01ecb4d2bb1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -67,7 +67,8 @@ static int ixgbe_find_enabled_vfs(struct ixgbe_adapter *adapter) | |||
67 | vf_devfn = pdev->devfn + 0x80; | 67 | vf_devfn = pdev->devfn + 0x80; |
68 | pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, device_id, NULL); | 68 | pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, device_id, NULL); |
69 | while (pvfdev) { | 69 | while (pvfdev) { |
70 | if (pvfdev->devfn == vf_devfn) | 70 | if (pvfdev->devfn == vf_devfn && |
71 | (pvfdev->bus->number >= pdev->bus->number)) | ||
71 | vfs_found++; | 72 | vfs_found++; |
72 | vf_devfn += 2; | 73 | vf_devfn += 2; |
73 | pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, | 74 | pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, |
@@ -646,6 +647,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) | |||
646 | ixgbe_ndo_set_vf_spoofchk(adapter->netdev, vf, false); | 647 | ixgbe_ndo_set_vf_spoofchk(adapter->netdev, vf, false); |
647 | retval = ixgbe_set_vf_macvlan(adapter, vf, index, | 648 | retval = ixgbe_set_vf_macvlan(adapter, vf, index, |
648 | (unsigned char *)(&msgbuf[1])); | 649 | (unsigned char *)(&msgbuf[1])); |
650 | if (retval == -ENOSPC) | ||
651 | e_warn(drv, "VF %d has requested a MACVLAN filter " | ||
652 | "but there is no space for it\n", vf); | ||
649 | break; | 653 | break; |
650 | default: | 654 | default: |
651 | e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]); | 655 | e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h index e8badab03359..2ab38d5fda92 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h index 802bfa0f62cc..9b95bef60970 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |
@@ -161,19 +161,19 @@ | |||
161 | 161 | ||
162 | /* Receive DMA Registers */ | 162 | /* Receive DMA Registers */ |
163 | #define IXGBE_RDBAL(_i) (((_i) < 64) ? (0x01000 + ((_i) * 0x40)) : \ | 163 | #define IXGBE_RDBAL(_i) (((_i) < 64) ? (0x01000 + ((_i) * 0x40)) : \ |
164 | (0x0D000 + ((_i - 64) * 0x40))) | 164 | (0x0D000 + (((_i) - 64) * 0x40))) |
165 | #define IXGBE_RDBAH(_i) (((_i) < 64) ? (0x01004 + ((_i) * 0x40)) : \ | 165 | #define IXGBE_RDBAH(_i) (((_i) < 64) ? (0x01004 + ((_i) * 0x40)) : \ |
166 | (0x0D004 + ((_i - 64) * 0x40))) | 166 | (0x0D004 + (((_i) - 64) * 0x40))) |
167 | #define IXGBE_RDLEN(_i) (((_i) < 64) ? (0x01008 + ((_i) * 0x40)) : \ | 167 | #define IXGBE_RDLEN(_i) (((_i) < 64) ? (0x01008 + ((_i) * 0x40)) : \ |
168 | (0x0D008 + ((_i - 64) * 0x40))) | 168 | (0x0D008 + (((_i) - 64) * 0x40))) |
169 | #define IXGBE_RDH(_i) (((_i) < 64) ? (0x01010 + ((_i) * 0x40)) : \ | 169 | #define IXGBE_RDH(_i) (((_i) < 64) ? (0x01010 + ((_i) * 0x40)) : \ |
170 | (0x0D010 + ((_i - 64) * 0x40))) | 170 | (0x0D010 + (((_i) - 64) * 0x40))) |
171 | #define IXGBE_RDT(_i) (((_i) < 64) ? (0x01018 + ((_i) * 0x40)) : \ | 171 | #define IXGBE_RDT(_i) (((_i) < 64) ? (0x01018 + ((_i) * 0x40)) : \ |
172 | (0x0D018 + ((_i - 64) * 0x40))) | 172 | (0x0D018 + (((_i) - 64) * 0x40))) |
173 | #define IXGBE_RXDCTL(_i) (((_i) < 64) ? (0x01028 + ((_i) * 0x40)) : \ | 173 | #define IXGBE_RXDCTL(_i) (((_i) < 64) ? (0x01028 + ((_i) * 0x40)) : \ |
174 | (0x0D028 + ((_i - 64) * 0x40))) | 174 | (0x0D028 + (((_i) - 64) * 0x40))) |
175 | #define IXGBE_RSCCTL(_i) (((_i) < 64) ? (0x0102C + ((_i) * 0x40)) : \ | 175 | #define IXGBE_RSCCTL(_i) (((_i) < 64) ? (0x0102C + ((_i) * 0x40)) : \ |
176 | (0x0D02C + ((_i - 64) * 0x40))) | 176 | (0x0D02C + (((_i) - 64) * 0x40))) |
177 | #define IXGBE_RSCDBU 0x03028 | 177 | #define IXGBE_RSCDBU 0x03028 |
178 | #define IXGBE_RDDCC 0x02F20 | 178 | #define IXGBE_RDDCC 0x02F20 |
179 | #define IXGBE_RXMEMWRAP 0x03190 | 179 | #define IXGBE_RXMEMWRAP 0x03190 |
@@ -186,7 +186,7 @@ | |||
186 | */ | 186 | */ |
187 | #define IXGBE_SRRCTL(_i) (((_i) <= 15) ? (0x02100 + ((_i) * 4)) : \ | 187 | #define IXGBE_SRRCTL(_i) (((_i) <= 15) ? (0x02100 + ((_i) * 4)) : \ |
188 | (((_i) < 64) ? (0x01014 + ((_i) * 0x40)) : \ | 188 | (((_i) < 64) ? (0x01014 + ((_i) * 0x40)) : \ |
189 | (0x0D014 + ((_i - 64) * 0x40)))) | 189 | (0x0D014 + (((_i) - 64) * 0x40)))) |
190 | /* | 190 | /* |
191 | * Rx DCA Control Register: | 191 | * Rx DCA Control Register: |
192 | * 00-15 : 0x02200 + n*4 | 192 | * 00-15 : 0x02200 + n*4 |
@@ -195,7 +195,7 @@ | |||
195 | */ | 195 | */ |
196 | #define IXGBE_DCA_RXCTRL(_i) (((_i) <= 15) ? (0x02200 + ((_i) * 4)) : \ | 196 | #define IXGBE_DCA_RXCTRL(_i) (((_i) <= 15) ? (0x02200 + ((_i) * 4)) : \ |
197 | (((_i) < 64) ? (0x0100C + ((_i) * 0x40)) : \ | 197 | (((_i) < 64) ? (0x0100C + ((_i) * 0x40)) : \ |
198 | (0x0D00C + ((_i - 64) * 0x40)))) | 198 | (0x0D00C + (((_i) - 64) * 0x40)))) |
199 | #define IXGBE_RDRXCTL 0x02F00 | 199 | #define IXGBE_RDRXCTL 0x02F00 |
200 | #define IXGBE_RXPBSIZE(_i) (0x03C00 + ((_i) * 4)) | 200 | #define IXGBE_RXPBSIZE(_i) (0x03C00 + ((_i) * 4)) |
201 | /* 8 of these 0x03C00 - 0x03C1C */ | 201 | /* 8 of these 0x03C00 - 0x03C1C */ |
@@ -344,9 +344,9 @@ | |||
344 | 344 | ||
345 | #define IXGBE_WUPL 0x05900 | 345 | #define IXGBE_WUPL 0x05900 |
346 | #define IXGBE_WUPM 0x05A00 /* wake up pkt memory 0x5A00-0x5A7C */ | 346 | #define IXGBE_WUPM 0x05A00 /* wake up pkt memory 0x5A00-0x5A7C */ |
347 | #define IXGBE_FHFT(_n) (0x09000 + (_n * 0x100)) /* Flex host filter table */ | 347 | #define IXGBE_FHFT(_n) (0x09000 + ((_n) * 0x100)) /* Flex host filter table */ |
348 | #define IXGBE_FHFT_EXT(_n) (0x09800 + (_n * 0x100)) /* Ext Flexible Host | 348 | #define IXGBE_FHFT_EXT(_n) (0x09800 + ((_n) * 0x100)) /* Ext Flexible Host |
349 | * Filter Table */ | 349 | * Filter Table */ |
350 | 350 | ||
351 | #define IXGBE_FLEXIBLE_FILTER_COUNT_MAX 4 | 351 | #define IXGBE_FLEXIBLE_FILTER_COUNT_MAX 4 |
352 | #define IXGBE_EXT_FLEXIBLE_FILTER_COUNT_MAX 2 | 352 | #define IXGBE_EXT_FLEXIBLE_FILTER_COUNT_MAX 2 |
@@ -1485,7 +1485,7 @@ enum { | |||
1485 | #define IXGBE_LED_BLINK_BASE 0x00000080 | 1485 | #define IXGBE_LED_BLINK_BASE 0x00000080 |
1486 | #define IXGBE_LED_MODE_MASK_BASE 0x0000000F | 1486 | #define IXGBE_LED_MODE_MASK_BASE 0x0000000F |
1487 | #define IXGBE_LED_OFFSET(_base, _i) (_base << (8 * (_i))) | 1487 | #define IXGBE_LED_OFFSET(_base, _i) (_base << (8 * (_i))) |
1488 | #define IXGBE_LED_MODE_SHIFT(_i) (8*(_i)) | 1488 | #define IXGBE_LED_MODE_SHIFT(_i) (8 * (_i)) |
1489 | #define IXGBE_LED_IVRT(_i) IXGBE_LED_OFFSET(IXGBE_LED_IVRT_BASE, _i) | 1489 | #define IXGBE_LED_IVRT(_i) IXGBE_LED_OFFSET(IXGBE_LED_IVRT_BASE, _i) |
1490 | #define IXGBE_LED_BLINK(_i) IXGBE_LED_OFFSET(IXGBE_LED_BLINK_BASE, _i) | 1490 | #define IXGBE_LED_BLINK(_i) IXGBE_LED_OFFSET(IXGBE_LED_BLINK_BASE, _i) |
1491 | #define IXGBE_LED_MODE_MASK(_i) IXGBE_LED_OFFSET(IXGBE_LED_MODE_MASK_BASE, _i) | 1491 | #define IXGBE_LED_MODE_MASK(_i) IXGBE_LED_OFFSET(IXGBE_LED_MODE_MASK_BASE, _i) |
@@ -2068,9 +2068,9 @@ enum { | |||
2068 | 2068 | ||
2069 | /* SR-IOV specific macros */ | 2069 | /* SR-IOV specific macros */ |
2070 | #define IXGBE_MBVFICR_INDEX(vf_number) (vf_number >> 4) | 2070 | #define IXGBE_MBVFICR_INDEX(vf_number) (vf_number >> 4) |
2071 | #define IXGBE_MBVFICR(_i) (0x00710 + (_i * 4)) | 2071 | #define IXGBE_MBVFICR(_i) (0x00710 + ((_i) * 4)) |
2072 | #define IXGBE_VFLRE(_i) (((_i & 1) ? 0x001C0 : 0x00600)) | 2072 | #define IXGBE_VFLRE(_i) ((((_i) & 1) ? 0x001C0 : 0x00600)) |
2073 | #define IXGBE_VFLREC(_i) (0x00700 + (_i * 4)) | 2073 | #define IXGBE_VFLREC(_i) (0x00700 + ((_i) * 4)) |
2074 | 2074 | ||
2075 | enum ixgbe_fdir_pballoc_type { | 2075 | enum ixgbe_fdir_pballoc_type { |
2076 | IXGBE_FDIR_PBALLOC_NONE = 0, | 2076 | IXGBE_FDIR_PBALLOC_NONE = 0, |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c index 8cc5eccfd651..f838a2be8cfb 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2011 Intel Corporation. | 4 | Copyright(c) 1999 - 2012 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, |