diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-11-20 18:25:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-21 14:34:05 -0500 |
commit | 3bb99fe226ead584a4db674dab546689f705201f (patch) | |
tree | 3b49aaef9f4b798b7930a76f62e754eefe0ddb91 /drivers/net/e1000e/netdev.c | |
parent | d8014dbca7f5d2d6f0fdb47e5286bd2d887f7065 (diff) |
e1000e: consolidate two dbug macros into one simpler one
This patch depends on a previous one that cleans up redundant #includes.
Signed-off-by: Bruce Allan <bruce.w.allan@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/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index ff9f9f1725e3..0b5352307f16 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -65,17 +65,6 @@ static const struct e1000_info *e1000_info_tbl[] = { | |||
65 | [board_pchlan] = &e1000_pch_info, | 65 | [board_pchlan] = &e1000_pch_info, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | #ifdef DEBUG | ||
69 | /** | ||
70 | * e1000_get_hw_dev_name - return device name string | ||
71 | * used by hardware layer to print debugging information | ||
72 | **/ | ||
73 | char *e1000e_get_hw_dev_name(struct e1000_hw *hw) | ||
74 | { | ||
75 | return hw->adapter->netdev->name; | ||
76 | } | ||
77 | #endif | ||
78 | |||
79 | /** | 68 | /** |
80 | * e1000_desc_unused - calculate if we have unused descriptors | 69 | * e1000_desc_unused - calculate if we have unused descriptors |
81 | **/ | 70 | **/ |
@@ -415,6 +404,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
415 | { | 404 | { |
416 | struct net_device *netdev = adapter->netdev; | 405 | struct net_device *netdev = adapter->netdev; |
417 | struct pci_dev *pdev = adapter->pdev; | 406 | struct pci_dev *pdev = adapter->pdev; |
407 | struct e1000_hw *hw = &adapter->hw; | ||
418 | struct e1000_ring *rx_ring = adapter->rx_ring; | 408 | struct e1000_ring *rx_ring = adapter->rx_ring; |
419 | struct e1000_rx_desc *rx_desc, *next_rxd; | 409 | struct e1000_rx_desc *rx_desc, *next_rxd; |
420 | struct e1000_buffer *buffer_info, *next_buffer; | 410 | struct e1000_buffer *buffer_info, *next_buffer; |
@@ -464,8 +454,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
464 | * packet, also make sure the frame isn't just CRC only */ | 454 | * packet, also make sure the frame isn't just CRC only */ |
465 | if (!(status & E1000_RXD_STAT_EOP) || (length <= 4)) { | 455 | if (!(status & E1000_RXD_STAT_EOP) || (length <= 4)) { |
466 | /* All receives must fit into a single buffer */ | 456 | /* All receives must fit into a single buffer */ |
467 | e_dbg("%s: Receive packet consumed multiple buffers\n", | 457 | e_dbg("Receive packet consumed multiple buffers\n"); |
468 | netdev->name); | ||
469 | /* recycle */ | 458 | /* recycle */ |
470 | buffer_info->skb = skb; | 459 | buffer_info->skb = skb; |
471 | goto next_desc; | 460 | goto next_desc; |
@@ -682,6 +671,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter) | |||
682 | static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | 671 | static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, |
683 | int *work_done, int work_to_do) | 672 | int *work_done, int work_to_do) |
684 | { | 673 | { |
674 | struct e1000_hw *hw = &adapter->hw; | ||
685 | union e1000_rx_desc_packet_split *rx_desc, *next_rxd; | 675 | union e1000_rx_desc_packet_split *rx_desc, *next_rxd; |
686 | struct net_device *netdev = adapter->netdev; | 676 | struct net_device *netdev = adapter->netdev; |
687 | struct pci_dev *pdev = adapter->pdev; | 677 | struct pci_dev *pdev = adapter->pdev; |
@@ -725,8 +715,8 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
725 | buffer_info->dma = 0; | 715 | buffer_info->dma = 0; |
726 | 716 | ||
727 | if (!(staterr & E1000_RXD_STAT_EOP)) { | 717 | if (!(staterr & E1000_RXD_STAT_EOP)) { |
728 | e_dbg("%s: Packet Split buffers didn't pick up the " | 718 | e_dbg("Packet Split buffers didn't pick up the full " |
729 | "full packet\n", netdev->name); | 719 | "packet\n"); |
730 | dev_kfree_skb_irq(skb); | 720 | dev_kfree_skb_irq(skb); |
731 | goto next_desc; | 721 | goto next_desc; |
732 | } | 722 | } |
@@ -739,8 +729,8 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
739 | length = le16_to_cpu(rx_desc->wb.middle.length0); | 729 | length = le16_to_cpu(rx_desc->wb.middle.length0); |
740 | 730 | ||
741 | if (!length) { | 731 | if (!length) { |
742 | e_dbg("%s: Last part of the packet spanning multiple " | 732 | e_dbg("Last part of the packet spanning multiple " |
743 | "descriptors\n", netdev->name); | 733 | "descriptors\n"); |
744 | dev_kfree_skb_irq(skb); | 734 | dev_kfree_skb_irq(skb); |
745 | goto next_desc; | 735 | goto next_desc; |
746 | } | 736 | } |
@@ -2931,7 +2921,7 @@ static irqreturn_t e1000_intr_msi_test(int irq, void *data) | |||
2931 | struct e1000_hw *hw = &adapter->hw; | 2921 | struct e1000_hw *hw = &adapter->hw; |
2932 | u32 icr = er32(ICR); | 2922 | u32 icr = er32(ICR); |
2933 | 2923 | ||
2934 | e_dbg("%s: icr is %08X\n", netdev->name, icr); | 2924 | e_dbg("icr is %08X\n", icr); |
2935 | if (icr & E1000_ICR_RXSEQ) { | 2925 | if (icr & E1000_ICR_RXSEQ) { |
2936 | adapter->flags &= ~FLAG_MSI_TEST_FAILED; | 2926 | adapter->flags &= ~FLAG_MSI_TEST_FAILED; |
2937 | wmb(); | 2927 | wmb(); |
@@ -3001,7 +2991,7 @@ static int e1000_test_msi_interrupt(struct e1000_adapter *adapter) | |||
3001 | goto msi_test_failed; | 2991 | goto msi_test_failed; |
3002 | 2992 | ||
3003 | /* okay so the test worked, restore settings */ | 2993 | /* okay so the test worked, restore settings */ |
3004 | e_dbg("%s: MSI interrupt test succeeded!\n", netdev->name); | 2994 | e_dbg("MSI interrupt test succeeded!\n"); |
3005 | msi_test_failed: | 2995 | msi_test_failed: |
3006 | e1000e_set_interrupt_capability(adapter); | 2996 | e1000e_set_interrupt_capability(adapter); |
3007 | e1000_request_irq(adapter); | 2997 | e1000_request_irq(adapter); |