From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ameen.rahman@qlogic.com,
anirban.chakraborty@qlogic.com
Subject: [PATCHv2 NEXT 3/8] qlcnic: fix diag register
Date: Mon, 4 Oct 2010 07:20:11 -0700 [thread overview]
Message-ID: <1286202016-18026-4-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1286202016-18026-1-git-send-email-amit.salecha@qlogic.com>
regs_buff[i] and diag_registers[j] array should use different index
variable.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/qlcnic/qlcnic_ethtool.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
index 550cfe9..6a76014 100644
--- a/drivers/net/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/qlcnic/qlcnic_ethtool.c
@@ -343,7 +343,7 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
struct qlcnic_recv_context *recv_ctx = &adapter->recv_ctx;
struct qlcnic_host_sds_ring *sds_ring;
u32 *regs_buff = p;
- int ring, i = 0;
+ int ring, i = 0, j = 0;
memset(p, 0, qlcnic_get_regs_len(dev));
regs->version = (QLCNIC_ETHTOOL_REGS_VER << 24) |
@@ -352,8 +352,8 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
regs_buff[0] = (0xcafe0000 | (QLCNIC_DEV_INFO_SIZE & 0xffff));
regs_buff[1] = QLCNIC_MGMT_API_VERSION;
- for (i = QLCNIC_DEV_INFO_SIZE + 1; diag_registers[i] != -1; i++)
- regs_buff[i] = QLCRD32(adapter, diag_registers[i]);
+ for (i = QLCNIC_DEV_INFO_SIZE + 1; diag_registers[j] != -1; j++, i++)
+ regs_buff[i] = QLCRD32(adapter, diag_registers[j]);
if (!test_bit(__QLCNIC_DEV_UP, &adapter->state))
return;
--
1.6.3.3
next prev parent reply other threads:[~2010-10-04 14:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 14:20 [PATCHv2 NEXT 0/8]qlcnic: miscellaneous fixes Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 1/8] qlcnic: fix internal loopback test Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 2/8] qlcnic: fix eswitch stats Amit Kumar Salecha
2010-10-04 14:20 ` Amit Kumar Salecha [this message]
2010-10-04 14:20 ` [PATCHv2 NEXT 4/8] qlcnic: fix endianess for lro Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 5/8] qlcnic: fix vlan TSO on big endian machine Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 6/8] qlcnic: sparse warning fixes Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 7/8] qlcnic: cleanup port mode setting Amit Kumar Salecha
2010-10-04 14:20 ` [PATCHv2 NEXT 8/8] qlcnic: set mtu lower limit Amit Kumar Salecha
2010-10-05 1:44 ` [PATCH net-next] qlcnic: remove dead code Stephen Hemminger
2010-10-05 6:18 ` Anirban Chakraborty
2010-10-05 7:48 ` David Miller
2010-10-05 5:48 ` [PATCHv2 NEXT 0/8]qlcnic: miscellaneous fixes David Miller
[not found] <1286205297-23214-1-git-send-email-amit.salecha@qlogic.com>
2010-10-04 15:14 ` [PATCHv2 NEXT 3/8] qlcnic: fix diag register Amit Kumar Salecha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286202016-18026-4-git-send-email-amit.salecha@qlogic.com \
--to=amit.salecha@qlogic.com \
--cc=ameen.rahman@qlogic.com \
--cc=anirban.chakraborty@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).