Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255682
b: refs/heads/master
c: c40f4ef
h: refs/heads/master
v: v3
  • Loading branch information
Anirban Chakraborty authored and David S. Miller committed Jun 24, 2011
1 parent debae53 commit d6d23c9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 287e38aa1adee01f63bb28e270afd3f738a6ab8c
refs/heads/master: c40f4ef77e5123a1d4064d7a34f708483b32b8be
5 changes: 2 additions & 3 deletions trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,7 @@ struct __ctrl {

struct __cache {
__le32 addr;
u8 stride;
u8 rsvd;
__le16 stride;
__le16 init_tag_val;
__le32 size;
__le32 no_ops;
Expand Down Expand Up @@ -1319,7 +1318,7 @@ enum op_codes {
#define QLCNIC_DUMP_SKIP BIT_7

#define QLCNIC_DUMP_MASK_MIN 3
#define QLCNIC_DUMP_MASK_DEF 0x0f
#define QLCNIC_DUMP_MASK_DEF 0x7f
#define QLCNIC_DUMP_MASK_MAX 0xff
#define QLCNIC_FORCE_FW_DUMP_KEY 0xdeadfeed

Expand Down
14 changes: 11 additions & 3 deletions trunk/drivers/net/qlcnic/qlcnic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d6d23c9

Please sign in to comment.