]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commitf781a22fa2ec11878a960bc3c2abb0a76f9a8f16
tree730299e58bb709ed21977270389521c295911ac8
parent541ef5cbb8e68189d47272cea52a69abc30259bc
IB/mlx4: Fix reading SL field out of cqe->sl_vid

Commit f780a9f1 ("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