Commit e4e3c8df authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] IB/mthca: fix reset value endianness

MTHCA_RESET_VALUE must always be swapped, since the HCA expects to see
it in big-endian order and we write it with writel.  This means on
little-endian systems we have to swap it to big-endian order before
writing, and on big-endian systems we need to swap it to make up for
the additional swap that writel will do.  This fixes resetting the HCA
on big-endian machines.
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3ed9f0ab
......@@ -50,7 +50,7 @@ int mthca_reset(struct mthca_dev *mdev)
struct pci_dev *bridge = NULL;
#define MTHCA_RESET_OFFSET 0xf0010
#define MTHCA_RESET_VALUE cpu_to_be32(1)
#define MTHCA_RESET_VALUE swab32(1)
/*
* Reset the chip. This is somewhat ugly because we have to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment