aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index b13fbc4ebd87..1d54ba315a3b 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -51,8 +51,8 @@
51#include <linux/workqueue.h> 51#include <linux/workqueue.h>
52#include <linux/phy.h> 52#include <linux/phy.h>
53#include <linux/mv643xx_eth.h> 53#include <linux/mv643xx_eth.h>
54#include <asm/io.h> 54#include <linux/io.h>
55#include <asm/types.h> 55#include <linux/types.h>
56#include <asm/system.h> 56#include <asm/system.h>
57 57
58static char mv643xx_eth_driver_name[] = "mv643xx_eth"; 58static char mv643xx_eth_driver_name[] = "mv643xx_eth";
@@ -138,14 +138,14 @@ static char mv643xx_eth_driver_version[] = "1.4";
138 138
139#if defined(__BIG_ENDIAN) 139#if defined(__BIG_ENDIAN)
140#define PORT_SDMA_CONFIG_DEFAULT_VALUE \ 140#define PORT_SDMA_CONFIG_DEFAULT_VALUE \
141 RX_BURST_SIZE_16_64BIT | \ 141 (RX_BURST_SIZE_16_64BIT | \
142 TX_BURST_SIZE_16_64BIT 142 TX_BURST_SIZE_16_64BIT)
143#elif defined(__LITTLE_ENDIAN) 143#elif defined(__LITTLE_ENDIAN)
144#define PORT_SDMA_CONFIG_DEFAULT_VALUE \ 144#define PORT_SDMA_CONFIG_DEFAULT_VALUE \
145 RX_BURST_SIZE_16_64BIT | \ 145 (RX_BURST_SIZE_16_64BIT | \
146 BLM_RX_NO_SWAP | \ 146 BLM_RX_NO_SWAP | \
147 BLM_TX_NO_SWAP | \ 147 BLM_TX_NO_SWAP | \
148 TX_BURST_SIZE_16_64BIT 148 TX_BURST_SIZE_16_64BIT)
149#else 149#else
150#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined 150#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
151#endif 151#endif
@@ -1081,20 +1081,20 @@ static int smi_bus_read(struct mii_bus *bus, int addr, int reg)
1081 int ret; 1081 int ret;
1082 1082
1083 if (smi_wait_ready(msp)) { 1083 if (smi_wait_ready(msp)) {
1084 printk("mv643xx_eth: SMI bus busy timeout\n"); 1084 printk(KERN_WARNING "mv643xx_eth: SMI bus busy timeout\n");
1085 return -ETIMEDOUT; 1085 return -ETIMEDOUT;
1086 } 1086 }
1087 1087
1088 writel(SMI_OPCODE_READ | (reg << 21) | (addr << 16), smi_reg); 1088 writel(SMI_OPCODE_READ | (reg << 21) | (addr << 16), smi_reg);
1089 1089
1090 if (smi_wait_ready(msp)) { 1090 if (smi_wait_ready(msp)) {
1091 printk("mv643xx_eth: SMI bus busy timeout\n"); 1091 printk(KERN_WARNING "mv643xx_eth: SMI bus busy timeout\n");
1092 return -ETIMEDOUT; 1092 return -ETIMEDOUT;
1093 } 1093 }
1094 1094
1095 ret = readl(smi_reg); 1095 ret = readl(smi_reg);
1096 if (!(ret & SMI_READ_VALID)) { 1096 if (!(ret & SMI_READ_VALID)) {
1097 printk("mv643xx_eth: SMI bus read not valid\n"); 1097 printk(KERN_WARNING "mv643xx_eth: SMI bus read not valid\n");
1098 return -ENODEV; 1098 return -ENODEV;
1099 } 1099 }
1100 1100
@@ -1107,7 +1107,7 @@ static int smi_bus_write(struct mii_bus *bus, int addr, int reg, u16 val)
1107 void __iomem *smi_reg = msp->base + SMI_REG; 1107 void __iomem *smi_reg = msp->base + SMI_REG;
1108 1108
1109 if (smi_wait_ready(msp)) { 1109 if (smi_wait_ready(msp)) {
1110 printk("mv643xx_eth: SMI bus busy timeout\n"); 1110 printk(KERN_WARNING "mv643xx_eth: SMI bus busy timeout\n");
1111 return -ETIMEDOUT; 1111 return -ETIMEDOUT;
1112 } 1112 }
1113 1113
@@ -1115,7 +1115,7 @@ static int smi_bus_write(struct mii_bus *bus, int addr, int reg, u16 val)
1115 (addr << 16) | (val & 0xffff), smi_reg); 1115 (addr << 16) | (val & 0xffff), smi_reg);
1116 1116
1117 if (smi_wait_ready(msp)) { 1117 if (smi_wait_ready(msp)) {
1118 printk("mv643xx_eth: SMI bus busy timeout\n"); 1118 printk(KERN_WARNING "mv643xx_eth: SMI bus busy timeout\n");
1119 return -ETIMEDOUT; 1119 return -ETIMEDOUT;
1120 } 1120 }
1121 1121
@@ -1268,7 +1268,8 @@ static const struct mv643xx_eth_stats mv643xx_eth_stats[] = {
1268 MIBSTAT(late_collision), 1268 MIBSTAT(late_collision),
1269}; 1269};
1270 1270
1271static int mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 1271static int
1272mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1272{ 1273{
1273 struct mv643xx_eth_private *mp = netdev_priv(dev); 1274 struct mv643xx_eth_private *mp = netdev_priv(dev);
1274 int err; 1275 int err;
@@ -1286,7 +1287,9 @@ static int mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *
1286 return err; 1287 return err;
1287} 1288}
1288 1289
1289static int mv643xx_eth_get_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd) 1290static int
1291mv643xx_eth_get_settings_phyless(struct net_device *dev,
1292 struct ethtool_cmd *cmd)
1290{ 1293{
1291 struct mv643xx_eth_private *mp = netdev_priv(dev); 1294 struct mv643xx_eth_private *mp = netdev_priv(dev);
1292 u32 port_status; 1295 u32 port_status;
@@ -1320,7 +1323,8 @@ static int mv643xx_eth_get_settings_phyless(struct net_device *dev, struct ethto
1320 return 0; 1323 return 0;
1321} 1324}
1322 1325
1323static int mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) 1326static int
1327mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1324{ 1328{
1325 struct mv643xx_eth_private *mp = netdev_priv(dev); 1329 struct mv643xx_eth_private *mp = netdev_priv(dev);
1326 1330
@@ -1332,7 +1336,9 @@ static int mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *
1332 return phy_ethtool_sset(mp->phy, cmd); 1336 return phy_ethtool_sset(mp->phy, cmd);
1333} 1337}
1334 1338
1335static int mv643xx_eth_set_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd) 1339static int
1340mv643xx_eth_set_settings_phyless(struct net_device *dev,
1341 struct ethtool_cmd *cmd)
1336{ 1342{
1337 return -EINVAL; 1343 return -EINVAL;
1338} 1344}
@@ -2336,7 +2342,7 @@ static void infer_hw_params(struct mv643xx_eth_shared_private *msp)
2336 2342
2337static int mv643xx_eth_shared_probe(struct platform_device *pdev) 2343static int mv643xx_eth_shared_probe(struct platform_device *pdev)
2338{ 2344{
2339 static int mv643xx_eth_version_printed = 0; 2345 static int mv643xx_eth_version_printed;
2340 struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data; 2346 struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
2341 struct mv643xx_eth_shared_private *msp; 2347 struct mv643xx_eth_shared_private *msp;
2342 struct resource *res; 2348 struct resource *res;