aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2012-05-21 22:17:49 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-07-21 19:04:30 -0400
commitce422606696f137e610fd0e677ec72ac33c17842 (patch)
treeb03df4d9d74170b956900504c5d9b8466b500b6b /drivers/net
parent39cb681b3bb4da17e74d48e553d1bb9a1b759aa5 (diff)
ixgbevf: Fix namespace issue with ixgbe_write_eitr
Make the function static to cleanup namespace. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <Sibai.li@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/ixgbevf.h1
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c43
2 files changed, 19 insertions, 25 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 66858b529f13..98cadb0c4dab 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -286,7 +286,6 @@ extern void ixgbevf_free_rx_resources(struct ixgbevf_adapter *,
286extern void ixgbevf_free_tx_resources(struct ixgbevf_adapter *, 286extern void ixgbevf_free_tx_resources(struct ixgbevf_adapter *,
287 struct ixgbevf_ring *); 287 struct ixgbevf_ring *);
288extern void ixgbevf_update_stats(struct ixgbevf_adapter *adapter); 288extern void ixgbevf_update_stats(struct ixgbevf_adapter *adapter);
289void ixgbevf_write_eitr(struct ixgbevf_q_vector *);
290extern int ethtool_ioctl(struct ifreq *ifr); 289extern int ethtool_ioctl(struct ifreq *ifr);
291 290
292extern void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter); 291extern void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter);
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index ccc801e99610..3f9841d619ad 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -540,6 +540,25 @@ static int ixgbevf_poll(struct napi_struct *napi, int budget)
540 return 0; 540 return 0;
541} 541}
542 542
543/**
544 * ixgbevf_write_eitr - write VTEITR register in hardware specific way
545 * @q_vector: structure containing interrupt and ring information
546 */
547static void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector)
548{
549 struct ixgbevf_adapter *adapter = q_vector->adapter;
550 struct ixgbe_hw *hw = &adapter->hw;
551 int v_idx = q_vector->v_idx;
552 u32 itr_reg = q_vector->itr & IXGBE_MAX_EITR;
553
554 /*
555 * set the WDIS bit to not clear the timer bits and cause an
556 * immediate assertion of the interrupt
557 */
558 itr_reg |= IXGBE_EITR_CNT_WDIS;
559
560 IXGBE_WRITE_REG(hw, IXGBE_VTEITR(v_idx), itr_reg);
561}
543 562
544/** 563/**
545 * ixgbevf_configure_msix - Configure MSI-X hardware 564 * ixgbevf_configure_msix - Configure MSI-X hardware
@@ -662,30 +681,6 @@ static void ixgbevf_update_itr(struct ixgbevf_q_vector *q_vector,
662 ring_container->itr = itr_setting; 681 ring_container->itr = itr_setting;
663} 682}
664 683
665/**
666 * ixgbevf_write_eitr - write VTEITR register in hardware specific way
667 * @q_vector: structure containing interrupt and ring information
668 *
669 * This function is made to be called by ethtool and by the driver
670 * when it needs to update VTEITR registers at runtime. Hardware
671 * specific quirks/differences are taken care of here.
672 */
673void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector)
674{
675 struct ixgbevf_adapter *adapter = q_vector->adapter;
676 struct ixgbe_hw *hw = &adapter->hw;
677 int v_idx = q_vector->v_idx;
678 u32 itr_reg = q_vector->itr & IXGBE_MAX_EITR;
679
680 /*
681 * set the WDIS bit to not clear the timer bits and cause an
682 * immediate assertion of the interrupt
683 */
684 itr_reg |= IXGBE_EITR_CNT_WDIS;
685
686 IXGBE_WRITE_REG(hw, IXGBE_VTEITR(v_idx), itr_reg);
687}
688
689static void ixgbevf_set_itr(struct ixgbevf_q_vector *q_vector) 684static void ixgbevf_set_itr(struct ixgbevf_q_vector *q_vector)
690{ 685{
691 u32 new_itr = q_vector->itr; 686 u32 new_itr = q_vector->itr;