diff options
author | Manish Chopra <manish.chopra@qlogic.com> | 2014-05-06 03:46:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-07 16:53:14 -0400 |
commit | d5d2bf3eabb34cc8eaf54db37fdc43f04267985a (patch) | |
tree | 0bf5757d167b90b762e6b66488d29cd00b9a4deb | |
parent | 76a691d0ab71a244f7582a5b0387728befbdb52f (diff) |
qlcnic: Fix panic while dumping TX queues on TX timeout
o In case of non-multi TX queue mode driver does not initialize "crb_intr_mask" pointer
and driver was accessing that un-initialized pointer while dumping TX queue.
So dump "crb_intr_mask" only when it is initilaized.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 0bc914859e38..be789513774c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |||
@@ -2943,9 +2943,13 @@ static void qlcnic_dump_tx_rings(struct qlcnic_adapter *adapter) | |||
2943 | tx_ring->tx_stats.xmit_called, | 2943 | tx_ring->tx_stats.xmit_called, |
2944 | tx_ring->tx_stats.xmit_on, | 2944 | tx_ring->tx_stats.xmit_on, |
2945 | tx_ring->tx_stats.xmit_off); | 2945 | tx_ring->tx_stats.xmit_off); |
2946 | |||
2947 | if (tx_ring->crb_intr_mask) | ||
2948 | netdev_info(netdev, "crb_intr_mask=%d\n", | ||
2949 | readl(tx_ring->crb_intr_mask)); | ||
2950 | |||
2946 | netdev_info(netdev, | 2951 | netdev_info(netdev, |
2947 | "crb_intr_mask=%d, hw_producer=%d, sw_producer=%d sw_consumer=%d, hw_consumer=%d\n", | 2952 | "hw_producer=%d, sw_producer=%d sw_consumer=%d, hw_consumer=%d\n", |
2948 | readl(tx_ring->crb_intr_mask), | ||
2949 | readl(tx_ring->crb_cmd_producer), | 2953 | readl(tx_ring->crb_cmd_producer), |
2950 | tx_ring->producer, tx_ring->sw_consumer, | 2954 | tx_ring->producer, tx_ring->sw_consumer, |
2951 | le32_to_cpu(*(tx_ring->hw_consumer))); | 2955 | le32_to_cpu(*(tx_ring->hw_consumer))); |