提交 c1b35a28 编写于 作者: L Lennert Buytenhek 提交者: Jeff Garzik

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: NLennert Buytenhek <buytenh@marvell.com>
Reviewed-by: NTzachi Perelstein <tzachi@marvell.com>
Signed-off-by: NDale Farnsworth <dale@farnsworth.org>
上级 afdb57a2
...@@ -1315,8 +1315,7 @@ static int mv643xx_eth_open(struct net_device *dev) ...@@ -1315,8 +1315,7 @@ static int mv643xx_eth_open(struct net_device *dev)
err = request_irq(dev->irq, mv643xx_eth_int_handler, err = request_irq(dev->irq, mv643xx_eth_int_handler,
IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
if (err) { if (err) {
printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n", printk(KERN_ERR "%s: Can not assign IRQ\n", dev->name);
port_num);
return -EAGAIN; return -EAGAIN;
} }
...@@ -1916,9 +1915,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev) ...@@ -1916,9 +1915,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
err = ethernet_phy_detect(mp); err = ethernet_phy_detect(mp);
if (err) { if (err) {
pr_debug("MV643xx ethernet port %d: " pr_debug("%s: No PHY detected at addr %d\n",
"No PHY detected at addr %d\n", dev->name, ethernet_phy_get(mp));
port_num, ethernet_phy_get(mp));
goto out; goto out;
} }
...@@ -2909,8 +2907,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp, ...@@ -2909,8 +2907,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp,
/* wait for the SMI register to become available */ /* wait for the SMI register to become available */
for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) { for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) {
if (i == PHY_WAIT_ITERATIONS) { if (i == PHY_WAIT_ITERATIONS) {
printk("mv643xx PHY busy timeout, port %d\n", printk("%s: PHY busy timeout\n", mp->dev->name);
mp->port_num);
goto out; goto out;
} }
udelay(PHY_WAIT_MICRO_SECONDS); udelay(PHY_WAIT_MICRO_SECONDS);
...@@ -2922,8 +2919,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp, ...@@ -2922,8 +2919,7 @@ static void eth_port_read_smi_reg(struct mv643xx_private *mp,
/* now wait for the data to be valid */ /* now wait for the data to be valid */
for (i = 0; !(mv_read(SMI_REG) & ETH_SMI_READ_VALID); i++) { for (i = 0; !(mv_read(SMI_REG) & ETH_SMI_READ_VALID); i++) {
if (i == PHY_WAIT_ITERATIONS) { if (i == PHY_WAIT_ITERATIONS) {
printk("mv643xx PHY read timeout, port %d\n", printk("%s: PHY read timeout\n", mp->dev->name);
mp->port_num);
goto out; goto out;
} }
udelay(PHY_WAIT_MICRO_SECONDS); udelay(PHY_WAIT_MICRO_SECONDS);
...@@ -2969,8 +2965,7 @@ static void eth_port_write_smi_reg(struct mv643xx_private *mp, ...@@ -2969,8 +2965,7 @@ static void eth_port_write_smi_reg(struct mv643xx_private *mp,
/* wait for the SMI register to become available */ /* wait for the SMI register to become available */
for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) { for (i = 0; mv_read(SMI_REG) & ETH_SMI_BUSY; i++) {
if (i == PHY_WAIT_ITERATIONS) { if (i == PHY_WAIT_ITERATIONS) {
printk("mv643xx PHY busy timeout, port %d\n", printk("%s: PHY busy timeout\n", mp->dev->name);
mp->port_num);
goto out; goto out;
} }
udelay(PHY_WAIT_MICRO_SECONDS); udelay(PHY_WAIT_MICRO_SECONDS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册