diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2011-06-22 06:52:19 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-24 12:17:06 +0400 |
commit | c40f4ef77e5123a1d4064d7a34f708483b32b8be (patch) | |
tree | 2c43604f7e21599b2632c8d0d5fb3e97babdd68b /drivers/net/qlcnic/qlcnic_hw.c | |
parent | 287e38aa1adee01f63bb28e270afd3f738a6ab8c (diff) | |
download | linux-c40f4ef77e5123a1d4064d7a34f708483b32b8be.tar.xz |
qlcnic: Add code to tune FW dump
To accommodate change in FW dump template, it is required to modify the
FW dump routine that captures cache data. Also, the default mask is changed
to capture a dump that would cover all the protocols that this FW supports.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_hw.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_hw.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index 1947f817bf23..81de563ee96c 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c @@ -1509,18 +1509,26 @@ qlcnic_dump_l2_cache(struct qlcnic_adapter *adapter, for (i = 0; i < l2->no_ops; i++) { QLCNIC_WR_DUMP_REG(l2->addr, base, val); - do { + if (LSW(l2->ctrl_val)) QLCNIC_WR_DUMP_REG(l2->ctrl_addr, base, LSW(l2->ctrl_val)); + if (!poll_mask) + goto skip_poll; + do { QLCNIC_RD_DUMP_REG(l2->ctrl_addr, base, &data); if (!(data & poll_mask)) break; msleep(1); time_out++; } while (time_out <= poll_to); - if (time_out > poll_to) - return -EINVAL; + if (time_out > poll_to) { + dev_err(&adapter->pdev->dev, + "Timeout exceeded in %s, aborting dump\n", + __func__); + return -EINVAL; + } +skip_poll: addr = l2->read_addr; cnt = l2->read_addr_num; while (cnt) { |