diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 69 |
2 files changed, 51 insertions, 20 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index f19cec860695..90a2dda351ec 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | |||
@@ -383,7 +383,7 @@ static int qlcnic_83xx_idc_tx_soft_reset(struct qlcnic_adapter *adapter) | |||
383 | qlcnic_up(adapter, netdev); | 383 | qlcnic_up(adapter, netdev); |
384 | netif_device_attach(netdev); | 384 | netif_device_attach(netdev); |
385 | clear_bit(__QLCNIC_RESETTING, &adapter->state); | 385 | clear_bit(__QLCNIC_RESETTING, &adapter->state); |
386 | dev_err(&adapter->pdev->dev, "%s:\n", __func__); | 386 | netdev_info(adapter->netdev, "%s: soft reset complete.\n", __func__); |
387 | 387 | ||
388 | return 0; | 388 | return 0; |
389 | } | 389 | } |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index e2ee2bb5cd5c..39b631049b77 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |||
@@ -2007,7 +2007,7 @@ qlcnic_reset_hw_context(struct qlcnic_adapter *adapter) | |||
2007 | netif_device_attach(netdev); | 2007 | netif_device_attach(netdev); |
2008 | 2008 | ||
2009 | clear_bit(__QLCNIC_RESETTING, &adapter->state); | 2009 | clear_bit(__QLCNIC_RESETTING, &adapter->state); |
2010 | dev_err(&adapter->pdev->dev, "%s:\n", __func__); | 2010 | netdev_info(adapter->netdev, "%s: soft reset complete\n", __func__); |
2011 | return 0; | 2011 | return 0; |
2012 | } | 2012 | } |
2013 | 2013 | ||
@@ -2747,12 +2747,58 @@ int qlcnic_check_temp(struct qlcnic_adapter *adapter) | |||
2747 | return rv; | 2747 | return rv; |
2748 | } | 2748 | } |
2749 | 2749 | ||
2750 | static void qlcnic_tx_timeout(struct net_device *netdev) | 2750 | static inline void dump_tx_ring_desc(struct qlcnic_host_tx_ring *tx_ring) |
2751 | { | 2751 | { |
2752 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | 2752 | int i; |
2753 | struct cmd_desc_type0 *tx_desc_info; | ||
2754 | |||
2755 | for (i = 0; i < tx_ring->num_desc; i++) { | ||
2756 | tx_desc_info = &tx_ring->desc_head[i]; | ||
2757 | pr_info("TX Desc: %d\n", i); | ||
2758 | print_hex_dump(KERN_INFO, "TX: ", DUMP_PREFIX_OFFSET, 16, 1, | ||
2759 | &tx_ring->desc_head[i], | ||
2760 | sizeof(struct cmd_desc_type0), true); | ||
2761 | } | ||
2762 | } | ||
2763 | |||
2764 | static void qlcnic_dump_tx_rings(struct qlcnic_adapter *adapter) | ||
2765 | { | ||
2766 | struct net_device *netdev = adapter->netdev; | ||
2753 | struct qlcnic_host_tx_ring *tx_ring; | 2767 | struct qlcnic_host_tx_ring *tx_ring; |
2754 | int ring; | 2768 | int ring; |
2755 | 2769 | ||
2770 | if (!netdev || !netif_running(netdev)) | ||
2771 | return; | ||
2772 | |||
2773 | for (ring = 0; ring < adapter->drv_tx_rings; ring++) { | ||
2774 | tx_ring = &adapter->tx_ring[ring]; | ||
2775 | netdev_info(netdev, "Tx ring=%d Context Id=0x%x\n", | ||
2776 | ring, tx_ring->ctx_id); | ||
2777 | netdev_info(netdev, | ||
2778 | "xmit_finished=%llu, xmit_called=%llu, xmit_on=%llu, xmit_off=%llu\n", | ||
2779 | tx_ring->tx_stats.xmit_finished, | ||
2780 | tx_ring->tx_stats.xmit_called, | ||
2781 | tx_ring->tx_stats.xmit_on, | ||
2782 | tx_ring->tx_stats.xmit_off); | ||
2783 | netdev_info(netdev, | ||
2784 | "crb_intr_mask=%d, hw_producer=%d, sw_producer=%d sw_consumer=%d, hw_consumer=%d\n", | ||
2785 | readl(tx_ring->crb_intr_mask), | ||
2786 | readl(tx_ring->crb_cmd_producer), | ||
2787 | tx_ring->producer, tx_ring->sw_consumer, | ||
2788 | le32_to_cpu(*(tx_ring->hw_consumer))); | ||
2789 | |||
2790 | netdev_info(netdev, "Total desc=%d, Available desc=%d\n", | ||
2791 | tx_ring->num_desc, qlcnic_tx_avail(tx_ring)); | ||
2792 | |||
2793 | if (netif_msg_tx_done(adapter->ahw)) | ||
2794 | dump_tx_ring_desc(tx_ring); | ||
2795 | } | ||
2796 | } | ||
2797 | |||
2798 | static void qlcnic_tx_timeout(struct net_device *netdev) | ||
2799 | { | ||
2800 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | ||
2801 | |||
2756 | if (test_bit(__QLCNIC_RESETTING, &adapter->state)) | 2802 | if (test_bit(__QLCNIC_RESETTING, &adapter->state)) |
2757 | return; | 2803 | return; |
2758 | 2804 | ||
@@ -2765,22 +2811,7 @@ static void qlcnic_tx_timeout(struct net_device *netdev) | |||
2765 | QLCNIC_FORCE_FW_DUMP_KEY); | 2811 | QLCNIC_FORCE_FW_DUMP_KEY); |
2766 | } else { | 2812 | } else { |
2767 | netdev_info(netdev, "Tx timeout, reset adapter context.\n"); | 2813 | netdev_info(netdev, "Tx timeout, reset adapter context.\n"); |
2768 | for (ring = 0; ring < adapter->drv_tx_rings; ring++) { | 2814 | qlcnic_dump_tx_rings(adapter); |
2769 | tx_ring = &adapter->tx_ring[ring]; | ||
2770 | netdev_info(netdev, "Tx ring=%d\n", ring); | ||
2771 | netdev_info(netdev, | ||
2772 | "crb_intr_mask=%d, producer=%d, sw_consumer=%d, hw_consumer=%d\n", | ||
2773 | readl(tx_ring->crb_intr_mask), | ||
2774 | readl(tx_ring->crb_cmd_producer), | ||
2775 | tx_ring->sw_consumer, | ||
2776 | le32_to_cpu(*(tx_ring->hw_consumer))); | ||
2777 | netdev_info(netdev, | ||
2778 | "xmit_finished=%llu, xmit_called=%llu, xmit_on=%llu, xmit_off=%llu\n", | ||
2779 | tx_ring->tx_stats.xmit_finished, | ||
2780 | tx_ring->tx_stats.xmit_called, | ||
2781 | tx_ring->tx_stats.xmit_on, | ||
2782 | tx_ring->tx_stats.xmit_off); | ||
2783 | } | ||
2784 | adapter->ahw->reset_context = 1; | 2815 | adapter->ahw->reset_context = 1; |
2785 | } | 2816 | } |
2786 | } | 2817 | } |