[PATCH][5/11] IB/mthca: fix reset value endianness
From: Roland Dreier
Date: Thu Mar 03 2005 - 00:40:22 EST
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: Roland Dreier <roland@xxxxxxxxxxx>
--- linux-export.orig/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-02 20:26:02.970843287 -0800
+++ linux-export/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-02 20:26:12.219835642 -0800
@@ -50,7 +50,7 @@
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/