]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix reading SL field out of cqe->sl_vid
authorRoland Dreier <rolandd@cisco.com>
Tue, 30 Dec 2008 23:30:26 +0000 (15:30 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Dec 2008 23:30:26 +0000 (15:30 -0800)
commiteed8efd6709b0c1c0316475745aea224210a9e12
tree730299e58bb709ed21977270389521c295911ac8
parent6b7462ffeddc7a75a48dda87e0e14b431c48747f
IB/mlx4: Fix reading SL field out of cqe->sl_vid

Commit 3f102cec ("mlx4_core: Add ethernet fields to CQE struct")
introduced a bug in how wc->sl is set in mlx4_ib_poll_one() -- since
cqe->sl_vid is a big-endian value, the shift must be done after
converting to host endianness.

This bug was found using sparse endianness checking.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/cq.c