aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-03-13 18:15:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-14 15:41:13 -0400
commit4df1046622797804150327bada9fdc564c090417 (patch)
treec7cfdddd52daeb21af714a2c74af9b461fe2b1aa /drivers
parent885125399e2c72b6466cfd2fbcb755be499b53a2 (diff)
ixgbe: Cleanup some whitespace issues, fixup and add some comments
Cleanup a bit of whitespace, add some function header comments, and fix a few comments around the driver. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c5
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c31
2 files changed, 29 insertions, 7 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 56efa98fe3b9..beae7e012609 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -404,8 +404,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw)
404{ 404{
405 s32 status = 0; 405 s32 status = 0;
406 ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_82599_AUTONEG; 406 ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_82599_AUTONEG;
407 status = ixgbe_setup_mac_link_speed_multispeed_fiber(hw, 407 status = ixgbe_setup_mac_link_speed_multispeed_fiber(hw, link_speed,
408 link_speed,
409 true, true); 408 true, true);
410 return status; 409 return status;
411} 410}
@@ -759,7 +758,7 @@ s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
759 hw->mac.orig_autoc = autoc; 758 hw->mac.orig_autoc = autoc;
760 hw->mac.orig_autoc2 = autoc2; 759 hw->mac.orig_autoc2 = autoc2;
761 hw->mac.orig_link_settings_stored = true; 760 hw->mac.orig_link_settings_stored = true;
762 } else { 761 } else {
763 if (autoc != hw->mac.orig_autoc) 762 if (autoc != hw->mac.orig_autoc)
764 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (hw->mac.orig_autoc | 763 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (hw->mac.orig_autoc |
765 IXGBE_AUTOC_AN_RESTART)); 764 IXGBE_AUTOC_AN_RESTART));
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 3e981a1b0cd6..0b2b609fad85 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -779,7 +779,8 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
779 779
780 q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; 780 q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
781 781
782 /* Populate the IVAR table and set the ITR values to the 782 /*
783 * Populate the IVAR table and set the ITR values to the
783 * corresponding register. 784 * corresponding register.
784 */ 785 */
785 for (v_idx = 0; v_idx < q_vectors; v_idx++) { 786 for (v_idx = 0; v_idx < q_vectors; v_idx++) {
@@ -814,7 +815,7 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
814 q_vector->eitr = adapter->eitr_param; 815 q_vector->eitr = adapter->eitr_param;
815 816
816 /* 817 /*
817 * since ths is initial set up don't need to call 818 * since this is initial set up don't need to call
818 * ixgbe_write_eitr helper 819 * ixgbe_write_eitr helper
819 */ 820 */
820 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(v_idx), 821 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(v_idx),
@@ -2675,6 +2676,14 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)
2675} 2676}
2676#endif 2677#endif
2677 2678
2679/**
2680 * ixgbe_set_rss_queues: Allocate queues for RSS
2681 * @adapter: board private structure to initialize
2682 *
2683 * This is our "base" multiqueue mode. RSS (Receive Side Scaling) will try
2684 * to allocate one Rx queue per CPU, and if available, one Tx queue per CPU.
2685 *
2686 **/
2678static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter) 2687static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
2679{ 2688{
2680 bool ret = false; 2689 bool ret = false;
@@ -2693,6 +2702,17 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
2693 return ret; 2702 return ret;
2694} 2703}
2695 2704
2705/*
2706 * ixgbe_set_num_queues: Allocate queues for device, feature dependant
2707 * @adapter: board private structure to initialize
2708 *
2709 * This is the top level queue allocation routine. The order here is very
2710 * important, starting with the "most" number of features turned on at once,
2711 * and ending with the smallest set of features. This way large combinations
2712 * can be allocated if they're turned on, and smaller combinations are the
2713 * fallthrough conditions.
2714 *
2715 **/
2696static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) 2716static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
2697{ 2717{
2698 /* Start with base case */ 2718 /* Start with base case */
@@ -2856,7 +2876,8 @@ static void ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
2856 * @adapter: board private structure to initialize 2876 * @adapter: board private structure to initialize
2857 * 2877 *
2858 * We allocate one ring per queue at run-time since we don't know the 2878 * We allocate one ring per queue at run-time since we don't know the
2859 * number of queues at compile-time. 2879 * number of queues at compile-time. The polling_netdev array is
2880 * intended for Multiqueue, but should work fine with a single queue.
2860 **/ 2881 **/
2861static int ixgbe_alloc_queues(struct ixgbe_adapter *adapter) 2882static int ixgbe_alloc_queues(struct ixgbe_adapter *adapter)
2862{ 2883{
@@ -3035,7 +3056,8 @@ static void ixgbe_sfp_timer(unsigned long data)
3035{ 3056{
3036 struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data; 3057 struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data;
3037 3058
3038 /* Do the sfp_timer outside of interrupt context due to the 3059 /*
3060 * Do the sfp_timer outside of interrupt context due to the
3039 * delays that sfp+ detection requires 3061 * delays that sfp+ detection requires
3040 */ 3062 */
3041 schedule_work(&adapter->sfp_task); 3063 schedule_work(&adapter->sfp_task);
@@ -3609,6 +3631,7 @@ static int ixgbe_suspend(struct pci_dev *pdev, pm_message_t state)
3609 retval = pci_save_state(pdev); 3631 retval = pci_save_state(pdev);
3610 if (retval) 3632 if (retval)
3611 return retval; 3633 return retval;
3634
3612#endif 3635#endif
3613 if (wufc) { 3636 if (wufc) {
3614 ixgbe_set_rx_mode(netdev); 3637 ixgbe_set_rx_mode(netdev);