Skip to content

Commit

Permalink
mlx4_core: Fix CQ context layout
Browse files Browse the repository at this point in the history
The reserved6 field should be 64 bits, not just 16 bits.  Without
this, the structure does not match the hardware layout on 32-bit
architectures: the db_rec_addr field ends up at offset 52 instead of
offset 56.  The bug slipped by because the alignment of __be64 members
ends up putting it in the right place on x86-64.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Jun 7, 2007
1 parent 7244d54 commit 09360d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx4/cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct mlx4_cq_context {
__be32 solicit_producer_index;
__be32 consumer_index;
__be32 producer_index;
u8 reserved6[2];
u32 reserved6[2];
__be64 db_rec_addr;
};

Expand Down

0 comments on commit 09360d5

Please sign in to comment.