diff options
author | Dotan Barak <dotanb@dev.mellanox.co.il> | 2007-06-26 08:55:28 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:26 -0400 |
commit | 149983af609e8f5c57157467baf8545d17b8a6a1 (patch) | |
tree | 4a8ea99e670a6e74b7b03122408a82d4c6e29518 /drivers/net/mlx4/fw.c | |
parent | 87427da55bc03dbce7906a5b09ed50279d654d28 (diff) |
mlx4_core: Get the maximum message size from reported device capabilities
Get the maximum message size from the device capabilities returned
from the QUERY_DEV_CAP firmware command, rather than hard-coding 2 GB.
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
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 d2b065351e45..c45cbe43a0c4 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c | |||
@@ -138,6 +138,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
138 | #define QUERY_DEV_CAP_ACK_DELAY_OFFSET 0x35 | 138 | #define QUERY_DEV_CAP_ACK_DELAY_OFFSET 0x35 |
139 | #define QUERY_DEV_CAP_MTU_WIDTH_OFFSET 0x36 | 139 | #define QUERY_DEV_CAP_MTU_WIDTH_OFFSET 0x36 |
140 | #define QUERY_DEV_CAP_VL_PORT_OFFSET 0x37 | 140 | #define QUERY_DEV_CAP_VL_PORT_OFFSET 0x37 |
141 | #define QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET 0x38 | ||
141 | #define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b | 142 | #define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b |
142 | #define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c | 143 | #define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c |
143 | #define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f | 144 | #define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f |
@@ -220,6 +221,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
220 | dev_cap->local_ca_ack_delay = field & 0x1f; | 221 | dev_cap->local_ca_ack_delay = field & 0x1f; |
221 | MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); | 222 | MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); |
222 | dev_cap->num_ports = field & 0xf; | 223 | dev_cap->num_ports = field & 0xf; |
224 | MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET); | ||
225 | dev_cap->max_msg_sz = 1 << (field & 0x1f); | ||
223 | MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET); | 226 | MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET); |
224 | dev_cap->stat_rate_support = stat_rate; | 227 | dev_cap->stat_rate_support = stat_rate; |
225 | MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); | 228 | MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); |