aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMark Rustad <mark.d.rustad@intel.com>2014-03-18 03:03:35 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-03-31 18:48:01 -0400
commit32c74949b4e37f80ab74d9b497ffb3749cfcb85a (patch)
tree2190761f56a8d7c1e898e94e6e9ccbec397a46c1 /drivers/net
parent6425f0f353b91c2edad65a7e7d1362d1787d26fd (diff)
ixgbevf: Change ixgbe_read_reg to ixgbevf_read_reg
Change the ixgbe_read_reg function name to ixgbevf_read_reg to avoid a namespace clash with the ixgbe driver. This will allow ixgbe to take its register read function out-of-line to reduce memory footprint. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ethtool.c8
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/vf.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index b2d002394e5d..1baecb60f065 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -540,10 +540,10 @@ static bool reg_pattern_test(struct ixgbevf_adapter *adapter, u64 *data,
540 return true; 540 return true;
541 } 541 }
542 for (pat = 0; pat < ARRAY_SIZE(register_test_patterns); pat++) { 542 for (pat = 0; pat < ARRAY_SIZE(register_test_patterns); pat++) {
543 before = ixgbe_read_reg(&adapter->hw, reg); 543 before = ixgbevf_read_reg(&adapter->hw, reg);
544 ixgbe_write_reg(&adapter->hw, reg, 544 ixgbe_write_reg(&adapter->hw, reg,
545 register_test_patterns[pat] & write); 545 register_test_patterns[pat] & write);
546 val = ixgbe_read_reg(&adapter->hw, reg); 546 val = ixgbevf_read_reg(&adapter->hw, reg);
547 if (val != (register_test_patterns[pat] & write & mask)) { 547 if (val != (register_test_patterns[pat] & write & mask)) {
548 hw_dbg(&adapter->hw, 548 hw_dbg(&adapter->hw,
549 "pattern test reg %04X failed: got 0x%08X expected 0x%08X\n", 549 "pattern test reg %04X failed: got 0x%08X expected 0x%08X\n",
@@ -567,9 +567,9 @@ static bool reg_set_and_check(struct ixgbevf_adapter *adapter, u64 *data,
567 *data = 1; 567 *data = 1;
568 return true; 568 return true;
569 } 569 }
570 before = ixgbe_read_reg(&adapter->hw, reg); 570 before = ixgbevf_read_reg(&adapter->hw, reg);
571 ixgbe_write_reg(&adapter->hw, reg, write & mask); 571 ixgbe_write_reg(&adapter->hw, reg, write & mask);
572 val = ixgbe_read_reg(&adapter->hw, reg); 572 val = ixgbevf_read_reg(&adapter->hw, reg);
573 if ((write & mask) != (val & mask)) { 573 if ((write & mask) != (val & mask)) {
574 pr_err("set/check reg %04X test failed: got 0x%08X expected 0x%08X\n", 574 pr_err("set/check reg %04X test failed: got 0x%08X expected 0x%08X\n",
575 reg, (val & mask), write & mask); 575 reg, (val & mask), write & mask);
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index a50e892a5d21..5d9375981713 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -124,12 +124,12 @@ static void ixgbevf_check_remove(struct ixgbe_hw *hw, u32 reg)
124 ixgbevf_remove_adapter(hw); 124 ixgbevf_remove_adapter(hw);
125 return; 125 return;
126 } 126 }
127 value = ixgbe_read_reg(hw, IXGBE_VFSTATUS); 127 value = ixgbevf_read_reg(hw, IXGBE_VFSTATUS);
128 if (value == IXGBE_FAILED_READ_REG) 128 if (value == IXGBE_FAILED_READ_REG)
129 ixgbevf_remove_adapter(hw); 129 ixgbevf_remove_adapter(hw);
130} 130}
131 131
132u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg) 132u32 ixgbevf_read_reg(struct ixgbe_hw *hw, u32 reg)
133{ 133{
134 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr); 134 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr);
135 u32 value; 135 u32 value;
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h b/drivers/net/ethernet/intel/ixgbevf/vf.h
index 096d33a59def..3061d1890471 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.h
@@ -186,8 +186,8 @@ static inline void ixgbe_write_reg(struct ixgbe_hw *hw, u32 reg, u32 value)
186} 186}
187#define IXGBE_WRITE_REG(h, r, v) ixgbe_write_reg(h, r, v) 187#define IXGBE_WRITE_REG(h, r, v) ixgbe_write_reg(h, r, v)
188 188
189u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg); 189u32 ixgbevf_read_reg(struct ixgbe_hw *hw, u32 reg);
190#define IXGBE_READ_REG(h, r) ixgbe_read_reg(h, r) 190#define IXGBE_READ_REG(h, r) ixgbevf_read_reg(h, r)
191 191
192static inline void ixgbe_write_reg_array(struct ixgbe_hw *hw, u32 reg, 192static inline void ixgbe_write_reg_array(struct ixgbe_hw *hw, u32 reg,
193 u32 offset, u32 value) 193 u32 offset, u32 value)
@@ -199,7 +199,7 @@ static inline void ixgbe_write_reg_array(struct ixgbe_hw *hw, u32 reg,
199static inline u32 ixgbe_read_reg_array(struct ixgbe_hw *hw, u32 reg, 199static inline u32 ixgbe_read_reg_array(struct ixgbe_hw *hw, u32 reg,
200 u32 offset) 200 u32 offset)
201{ 201{
202 return ixgbe_read_reg(hw, reg + (offset << 2)); 202 return ixgbevf_read_reg(hw, reg + (offset << 2));
203} 203}
204#define IXGBE_READ_REG_ARRAY(h, r, o) ixgbe_read_reg_array(h, r, o) 204#define IXGBE_READ_REG_ARRAY(h, r, o) ixgbe_read_reg_array(h, r, o)
205 205