diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-08-31 13:17:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-01 13:41:53 -0400 |
commit | 2cffcdbf7670980d4d74e2daea8a6cc0729902b8 (patch) | |
tree | b6d81873384ebf6839d7591f6810a7bc4850b1ba /drivers/net/qlcnic | |
parent | 4e70812b3dc32c76fa2fa3aa2c8221eaac87cd6f (diff) |
qlcnic: add api version in reg dump
o ethtool reg version bumped to 2
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index e294b825bac5..cb9463bd6b1e 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c | |||
@@ -115,9 +115,13 @@ static const u32 diag_registers[] = { | |||
115 | -1 | 115 | -1 |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #define QLCNIC_MGMT_API_VERSION 2 | ||
119 | #define QLCNIC_DEV_INFO_SIZE 1 | ||
120 | #define QLCNIC_ETHTOOL_REGS_VER 2 | ||
118 | static int qlcnic_get_regs_len(struct net_device *dev) | 121 | static int qlcnic_get_regs_len(struct net_device *dev) |
119 | { | 122 | { |
120 | return sizeof(diag_registers) + QLCNIC_RING_REGS_LEN; | 123 | return sizeof(diag_registers) + QLCNIC_RING_REGS_LEN + |
124 | QLCNIC_DEV_INFO_SIZE + 1; | ||
121 | } | 125 | } |
122 | 126 | ||
123 | static int qlcnic_get_eeprom_len(struct net_device *dev) | 127 | static int qlcnic_get_eeprom_len(struct net_device *dev) |
@@ -342,10 +346,13 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) | |||
342 | int ring, i = 0; | 346 | int ring, i = 0; |
343 | 347 | ||
344 | memset(p, 0, qlcnic_get_regs_len(dev)); | 348 | memset(p, 0, qlcnic_get_regs_len(dev)); |
345 | regs->version = (1 << 24) | (adapter->ahw.revision_id << 16) | | 349 | regs->version = (QLCNIC_ETHTOOL_REGS_VER << 24) | |
346 | (adapter->pdev)->device; | 350 | (adapter->ahw.revision_id << 16) | (adapter->pdev)->device; |
347 | 351 | ||
348 | for (i = 0; diag_registers[i] != -1; i++) | 352 | regs_buff[0] = (0xcafe0000 | (QLCNIC_DEV_INFO_SIZE & 0xffff)); |
353 | regs_buff[1] = QLCNIC_MGMT_API_VERSION; | ||
354 | |||
355 | for (i = QLCNIC_DEV_INFO_SIZE + 1; diag_registers[i] != -1; i++) | ||
349 | regs_buff[i] = QLCRD32(adapter, diag_registers[i]); | 356 | regs_buff[i] = QLCRD32(adapter, diag_registers[i]); |
350 | 357 | ||
351 | if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) | 358 | if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) |