diff options
author | Roland Dreier <rolandd@cisco.com> | 2011-01-12 12:50:36 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-12 12:50:36 -0500 |
commit | 4979d18fe105297f8f065743f31f8f735da8df2d (patch) | |
tree | 36776f85b2bee47c5a671db498939305589d23aa /drivers/net/mlx4/catas.c | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) |
mlx4_{core, ib, en}: Fix driver when sizeof (phys_addr_t) > sizeof (long)
Some systems have PCI addresses that don't fit in unsigned long (eg some
32-bit PowerPC 440 systems have 36-bit bus addresses). Fix up mlx4 drivers
by using phys_addr_t where appropriate, so we don't truncate any PCI
resource addresses before ioremapping them.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/catas.c')
-rw-r--r-- | drivers/net/mlx4/catas.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/mlx4/catas.c b/drivers/net/mlx4/catas.c index 68aaa42d0ced..32f947154c33 100644 --- a/drivers/net/mlx4/catas.c +++ b/drivers/net/mlx4/catas.c | |||
@@ -113,7 +113,7 @@ static void catas_reset(struct work_struct *work) | |||
113 | void mlx4_start_catas_poll(struct mlx4_dev *dev) | 113 | void mlx4_start_catas_poll(struct mlx4_dev *dev) |
114 | { | 114 | { |
115 | struct mlx4_priv *priv = mlx4_priv(dev); | 115 | struct mlx4_priv *priv = mlx4_priv(dev); |
116 | unsigned long addr; | 116 | phys_addr_t addr; |
117 | 117 | ||
118 | INIT_LIST_HEAD(&priv->catas_err.list); | 118 | INIT_LIST_HEAD(&priv->catas_err.list); |
119 | init_timer(&priv->catas_err.timer); | 119 | init_timer(&priv->catas_err.timer); |
@@ -124,8 +124,8 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) | |||
124 | 124 | ||
125 | priv->catas_err.map = ioremap(addr, priv->fw.catas_size * 4); | 125 | priv->catas_err.map = ioremap(addr, priv->fw.catas_size * 4); |
126 | if (!priv->catas_err.map) { | 126 | if (!priv->catas_err.map) { |
127 | mlx4_warn(dev, "Failed to map internal error buffer at 0x%lx\n", | 127 | mlx4_warn(dev, "Failed to map internal error buffer at 0x%llx\n", |
128 | addr); | 128 | (unsigned long long) addr); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | 131 | ||