qlcnic: Stop pause ctrl frames on fw hang.
authorSritej Velaga <sritej.velaga@qlogic.com>
Fri, 3 Feb 2012 13:45:41 +0000 (13:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Feb 2012 20:59:29 +0000 (15:59 -0500)
When firmware hang is detected, fw should stop sending pause control frames.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 7bfdf57f4b76674a1624af29d92dcbb4dfa15342..a47c70b093428f005b9cb9093679cb9256750d0b 100644 (file)
@@ -2999,8 +2999,18 @@ qlcnic_set_npar_non_operational(struct qlcnic_adapter *adapter)
 void
 qlcnic_dev_request_reset(struct qlcnic_adapter *adapter)
 {
-       u32 state;
-
+       u32 state, xg_val = 0, gb_val = 0;
+
+       qlcnic_xg_set_xg0_mask(xg_val);
+       qlcnic_xg_set_xg1_mask(xg_val);
+       QLCWR32(adapter, QLCNIC_NIU_XG_PAUSE_CTL, xg_val);
+       qlcnic_gb_set_gb0_mask(gb_val);
+       qlcnic_gb_set_gb1_mask(gb_val);
+       qlcnic_gb_set_gb2_mask(gb_val);
+       qlcnic_gb_set_gb3_mask(gb_val);
+       QLCWR32(adapter, QLCNIC_NIU_GB_PAUSE_CTL, gb_val);
+       dev_info(&adapter->pdev->dev, "Pause control frames disabled"
+                               " on all ports\n");
        adapter->need_fw_reset = 1;
        if (qlcnic_api_lock(adapter))
                return;