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/en_port.h | |
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/en_port.h')
-rw-r--r-- | drivers/net/mlx4/en_port.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_port.h b/drivers/net/mlx4/en_port.h index e6477f12beb5..f6511aa2b7df 100644 --- a/drivers/net/mlx4/en_port.h +++ b/drivers/net/mlx4/en_port.h | |||
@@ -84,6 +84,20 @@ enum { | |||
84 | MLX4_MCAST_ENABLE = 2, | 84 | MLX4_MCAST_ENABLE = 2, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | struct mlx4_en_query_port_context { | ||
88 | u8 link_up; | ||
89 | #define MLX4_EN_LINK_UP_MASK 0x80 | ||
90 | u8 reserved; | ||
91 | __be16 mtu; | ||
92 | u8 reserved2; | ||
93 | u8 link_speed; | ||
94 | #define MLX4_EN_SPEED_MASK 0x3 | ||
95 | #define MLX4_EN_1G_SPEED 0x2 | ||
96 | u16 reserved3[5]; | ||
97 | __be64 mac; | ||
98 | u8 transceiver; | ||
99 | }; | ||
100 | |||
87 | 101 | ||
88 | struct mlx4_en_stat_out_mbox { | 102 | struct mlx4_en_stat_out_mbox { |
89 | /* Received frames with a length of 64 octets */ | 103 | /* Received frames with a length of 64 octets */ |