diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2010-08-23 23:46:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 17:54:51 -0400 |
commit | e7c1c2c46201e46f8ce817196507d2ffd3dafd8e (patch) | |
tree | 33579da64d2c5dc4502518496097dcf9737e9eb4 /drivers/net/mlx4/fw.c | |
parent | 3005ad40b95168aad530f1179cff47411b3ea8da (diff) |
mlx4_en: Added self diagnostics test implementation
The selftest includes 5 features:
1. Interrupt test: Executing commands and receiving command completion
on all our interrupt vectors.
2. Link test: Verifying we are connected to valid link partner.
3. Speed test: Check that we negotiated link speed correctly.
4. Registers test: Activate HW health check command.
5. Loopback test: Send a packet on loopback interface and catch it on RX side.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/fw.c')
-rw-r--r-- | drivers/net/mlx4/fw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index 04f42ae1eda0..a87bf3c97055 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c | |||
@@ -178,6 +178,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
178 | #define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b | 178 | #define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b |
179 | #define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c | 179 | #define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c |
180 | #define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f | 180 | #define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f |
181 | #define QUERY_DEV_CAP_ETH_UC_LOOPBACK_OFFSET 0x43 | ||
181 | #define QUERY_DEV_CAP_FLAGS_OFFSET 0x44 | 182 | #define QUERY_DEV_CAP_FLAGS_OFFSET 0x44 |
182 | #define QUERY_DEV_CAP_RSVD_UAR_OFFSET 0x48 | 183 | #define QUERY_DEV_CAP_RSVD_UAR_OFFSET 0x48 |
183 | #define QUERY_DEV_CAP_UAR_SZ_OFFSET 0x49 | 184 | #define QUERY_DEV_CAP_UAR_SZ_OFFSET 0x49 |
@@ -268,6 +269,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
268 | dev_cap->max_msg_sz = 1 << (field & 0x1f); | 269 | dev_cap->max_msg_sz = 1 << (field & 0x1f); |
269 | MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET); | 270 | MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET); |
270 | dev_cap->stat_rate_support = stat_rate; | 271 | dev_cap->stat_rate_support = stat_rate; |
272 | MLX4_GET(field, outbox, QUERY_DEV_CAP_ETH_UC_LOOPBACK_OFFSET); | ||
273 | dev_cap->loopback_support = field & 0x1; | ||
271 | MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); | 274 | MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); |
272 | MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_UAR_OFFSET); | 275 | MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_UAR_OFFSET); |
273 | dev_cap->reserved_uars = field >> 4; | 276 | dev_cap->reserved_uars = field >> 4; |