mlx4_core: num reserved eqs presented as log and actual
Subsystems (2)
PATCH 1/1 mlx4_core: num reserved eqs presented as log and actual
Multifunctional firmware should present number of reserved EQs as
an actual number (number of reserved eqs is not necessarily a power
of 2).
Older drivers treat this field as log, so when there are relatively big number of reserved eqs, they would fail.
The firmware would present the number of EQs as log in a single function mode (which would also work for older driver versions) and as actual number (in other field) in multifunctional mode. The new code would check both fields.
Fixes commit be504b0b9fbe9ba447c93ef0f5789f377102d555
--- drivers/net/mlx4/fw.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
drivers/net/mlx4/fw.c +7 -2
@@ -155,11 +155,12 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)#define QUERY_DEV_CAP_MAX_SRQ_OFFSET 0x15#define QUERY_DEV_CAP_RSVD_EEC_OFFSET 0x16#define QUERY_DEV_CAP_MAX_EEC_OFFSET 0x17 +#define QUERY_DEV_CAP_RSVD_EQ_OFFSET 0x18#define QUERY_DEV_CAP_MAX_CQ_SZ_OFFSET 0x19#define QUERY_DEV_CAP_RSVD_CQ_OFFSET 0x1a#define QUERY_DEV_CAP_MAX_CQ_OFFSET 0x1b#define QUERY_DEV_CAP_MAX_MPT_OFFSET 0x1d -#define QUERY_DEV_CAP_RSVD_EQ_OFFSET 0x1e +#define QUERY_DEV_CAP_LOG_RSVD_EQ_OFFSET 0x1e#define QUERY_DEV_CAP_MAX_EQ_OFFSET 0x1f#define QUERY_DEV_CAP_RSVD_MTT_OFFSET 0x20#define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21
@@ -236,7 +237,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)MLX4_GET (field, outbox,QUERY_DEV_CAP_MAX_MPT_OFFSET ); dev_cap->max_mpts =1 << (field &0x3f );MLX4_GET (field, outbox,QUERY_DEV_CAP_RSVD_EQ_OFFSET ); - dev_cap->reserved_eqs = field &0xf ; +if (!field) { +MLX4_GET (field, outbox,QUERY_DEV_CAP_LOG_RSVD_EQ_OFFSET ); + dev_cap->reserved_eqs =1 << (field &0xf ); + }else + dev_cap->reserved_eqs = field;MLX4_GET (field, outbox,QUERY_DEV_CAP_MAX_EQ_OFFSET ); dev_cap->max_eqs =1 << (field &0xf );MLX4_GET (field, outbox,QUERY_DEV_CAP_RSVD_MTT_OFFSET );
Signature · 6 lines
1.6.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 4B790CAD.2070007-VPRAkNaXOzVS1MOuV/[email protected]
Quoted 9 lines
Multifunctional firmware should present number of reserved EQs as
an actual number (number of reserved eqs is not necessarily a power
of 2).
Older drivers treat this field as log, so when there are relatively big number of reserved eqs, they would fail.
The firmware would present the number of EQs as log in a single function mode (which would also work for older driver versions) and as actual number (in other field) in multifunctional mode. The new code would check both fields.
Fixes commitbe504b0b9fbe9ba447c93ef0f5789f377102d555
I can't really follow this changelog. The (very old) ConnextX PRM I have states that the field returned by the firmware is the actual number, so the old driver behavior was wrong. Or was the PRM wrong?
Are you changing the firmware behavior to make that field into a log?
Is this really the best way to clean this up, having the same information twice in two different formats?
Signature · 7 lines
Roland Dreier <[email protected]> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html