summaryrefslogtreecommitdiff
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-03-18 11:37:19 -0700
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:06:49 -0400
commitc1b35a28f20c2d6ff8c5a2a035002c06b9f498c9 (patch)
tree5f529d3a560669e99a598b7707dbb9c16e671cf0 /drivers/net/mv643xx_eth.c
parentafdb57a2499a630d82b234307b1fc928088b9174 (diff)
mv643xx_eth: report netdev name in all printks
In error and warning printks, always report the netdevice name instead of the port index (the latter has no meaning when there are multiple mv643xx_eth silicon blocks in the system.) Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Reviewed-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index b31844cb1ab4..5a4ae86e145f 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1315,8 +1315,7 @@ static int mv643xx_eth_open(struct net_device *dev)
err = request_irq(dev->irq, mv643xx_eth_int_handler,
IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
if (err) {
- printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n",
- port_num);
+ printk(KERN_ERR "%s: Can not assign IRQ\n", dev->name);
return -EAGAIN;
}
@@ -1916,9 +1915,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
err = ethernet_phy_detect(mp);
if (err) {
- pr_debug("MV643xx ethernet port %d: "
- "No PHY detected at addr %d\n",
- port_num, ethernet_phy_get(mp));
+ pr_debug("%s: No PHY detected at addr %d\n",
+ dev->name, ethernet_phy_get(mp));
goto out;
}
@@ -2909,8 +2907,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp,
/* wait for the SMI register to become available */
for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) {
if (i == PHY_WAIT_ITERATIONS) {
- printk("mv643xx PHY busy timeout, port %d\n",
- mp->port_num);
+ printk("%s: PHY busy timeout\n", mp->dev->name);
goto out;
}
udelay(PHY_WAIT_MICRO_SECONDS);
@@ -2922,8 +2919,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp,
/* now wait for the data to be valid */
for (i = 0; !(mv_read(SMI_REG) & ETH_SMI_READ_VALID); i++) {
if (i == PHY_WAIT_ITERATIONS) {
- printk("mv643xx PHY read timeout, port %d\n",
- mp->port_num);
+ printk("%s: PHY read timeout\n", mp->dev->name);
goto out;
}
udelay(PHY_WAIT_MICRO_SECONDS);
@@ -2969,8 +2965,7 @@ static void eth_port_write_smi_reg(struct mv643xx_private *mp,
/* wait for the SMI register to become available */
for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) {
if (i == PHY_WAIT_ITERATIONS) {
- printk("mv643xx PHY busy timeout, port %d\n",
- mp->port_num);
+ printk("%s: PHY busy timeout\n", mp->dev->name);
goto out;
}
udelay(PHY_WAIT_MICRO_SECONDS);