summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-04 11:46:43 -0700
committerGrant Likely <grant.likely@secretlab.ca>2011-02-04 11:46:43 -0700
commitc64eae9a73a847c1698f913c893aa4012d2a30b0 (patch)
tree732684b9ffe9dfd6e9a11b1f006eaaefeb0e945b /drivers/net/cnic.c
parentc9e358dfc4a8cb2227172ef77908c2e0ee17bcb9 (diff)
parentebf53826e105f488f4f628703a108e98940d1dc5 (diff)
downloadblackbird-op-linux-c64eae9a73a847c1698f913c893aa4012d2a30b0.tar.gz
blackbird-op-linux-c64eae9a73a847c1698f913c893aa4012d2a30b0.zip
Merge commit 'v2.6.38-rc3' into devicetree/next
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r--drivers/net/cnic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 263a2944566f..7ff170cbc7dc 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -699,13 +699,13 @@ static void cnic_free_dma(struct cnic_dev *dev, struct cnic_dma *dma)
static void cnic_setup_page_tbl(struct cnic_dev *dev, struct cnic_dma *dma)
{
int i;
- u32 *page_table = dma->pgtbl;
+ __le32 *page_table = (__le32 *) dma->pgtbl;
for (i = 0; i < dma->num_pages; i++) {
/* Each entry needs to be in big endian format. */
- *page_table = (u32) ((u64) dma->pg_map_arr[i] >> 32);
+ *page_table = cpu_to_le32((u64) dma->pg_map_arr[i] >> 32);
page_table++;
- *page_table = (u32) dma->pg_map_arr[i];
+ *page_table = cpu_to_le32(dma->pg_map_arr[i] & 0xffffffff);
page_table++;
}
}
@@ -713,13 +713,13 @@ static void cnic_setup_page_tbl(struct cnic_dev *dev, struct cnic_dma *dma)
static void cnic_setup_page_tbl_le(struct cnic_dev *dev, struct cnic_dma *dma)
{
int i;
- u32 *page_table = dma->pgtbl;
+ __le32 *page_table = (__le32 *) dma->pgtbl;
for (i = 0; i < dma->num_pages; i++) {
/* Each entry needs to be in little endian format. */
- *page_table = dma->pg_map_arr[i] & 0xffffffff;
+ *page_table = cpu_to_le32(dma->pg_map_arr[i] & 0xffffffff);
page_table++;
- *page_table = (u32) ((u64) dma->pg_map_arr[i] >> 32);
+ *page_table = cpu_to_le32((u64) dma->pg_map_arr[i] >> 32);
page_table++;
}
}
OpenPOWER on IntegriCloud