]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mlx4_core: Fix CQ context layout
authorEli Cohen <eli@mellanox.co.il>
Wed, 30 May 2007 10:14:31 +0000 (13:14 +0300)
committerRoland Dreier <rolandd@cisco.com>
Thu, 7 Jun 2007 18:51:57 +0000 (11:51 -0700)
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>
drivers/net/mlx4/cq.c

index 437d78ad0912b3fbe9cfcedeeb0150cd6d151c2c..39253d0c1590eca709e54f5bab833990926e0860 100644 (file)
@@ -61,7 +61,7 @@ struct mlx4_cq_context {
        __be32                  solicit_producer_index;
        __be32                  consumer_index;
        __be32                  producer_index;
-       u                     reserved6[2];
+       u32                     reserved6[2];
        __be64                  db_rec_addr;
 };