lkml.org 
[lkml]   [2005]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH][5/11] IB/mthca: fix reset value endianness
Date
From
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@topspin.com>


--- 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.044 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site