aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-29 02:42:02 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-29 14:44:56 -0500
commitc20ec76157747434652e721cdd4dccd8654ad370 (patch)
tree9635f9d233ce60babf763166fa2f5aeeff049af0 /drivers
parentef46ffbc2841dddebe521764c06673474ca5d041 (diff)
forcedeth: Use netdev_dbg for printk(KERN_DEBUG
Use the normal debugging functions. Print mac address when using random_ether_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/forcedeth.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index c2945d669b4f..cd2d72d825df 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -3407,7 +3407,8 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data)
3407 mod_timer(&np->nic_poll, jiffies + POLL_WAIT); 3407 mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
3408 } 3408 }
3409 spin_unlock_irqrestore(&np->lock, flags); 3409 spin_unlock_irqrestore(&np->lock, flags);
3410 printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i); 3410 netdev_dbg(dev, "%s: too many iterations (%d)\n",
3411 __func__, i);
3411 break; 3412 break;
3412 } 3413 }
3413 3414
@@ -3522,7 +3523,8 @@ static irqreturn_t nv_nic_irq_rx(int foo, void *data)
3522 mod_timer(&np->nic_poll, jiffies + POLL_WAIT); 3523 mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
3523 } 3524 }
3524 spin_unlock_irqrestore(&np->lock, flags); 3525 spin_unlock_irqrestore(&np->lock, flags);
3525 printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i); 3526 netdev_dbg(dev, "%s: too many iterations (%d)\n",
3527 __func__, i);
3526 break; 3528 break;
3527 } 3529 }
3528 } 3530 }
@@ -3586,7 +3588,8 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
3586 mod_timer(&np->nic_poll, jiffies + POLL_WAIT); 3588 mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
3587 } 3589 }
3588 spin_unlock_irqrestore(&np->lock, flags); 3590 spin_unlock_irqrestore(&np->lock, flags);
3589 printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i); 3591 netdev_dbg(dev, "%s: too many iterations (%d)\n",
3592 __func__, i);
3590 break; 3593 break;
3591 } 3594 }
3592 3595
@@ -5463,7 +5466,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5463 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; 5466 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
5464 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; 5467 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
5465 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); 5468 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll);
5466 printk(KERN_DEBUG "nv_probe: set workaround bit for reversed mac addr\n"); 5469 dev_dbg(&pci_dev->dev,
5470 "%s: set workaround bit for reversed mac addr\n",
5471 __func__);
5467 } 5472 }
5468 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 5473 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
5469 5474
@@ -5473,11 +5478,11 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5473 * to 01:23:45:67:89:ab 5478 * to 01:23:45:67:89:ab
5474 */ 5479 */
5475 dev_err(&pci_dev->dev, 5480 dev_err(&pci_dev->dev,
5476 "Invalid MAC address detected: %pM\n", 5481 "Invalid MAC address detected: %pM - Please complain to your hardware vendor.\n",
5477 dev->dev_addr); 5482 dev->dev_addr);
5478 dev_err(&pci_dev->dev,
5479 "Please complain to your hardware vendor. Switched to a random MAC address.\n");
5480 random_ether_addr(dev->dev_addr); 5483 random_ether_addr(dev->dev_addr);
5484 dev_err(&pci_dev->dev,
5485 "Using random MAC address: %pM\n", dev->dev_addr);
5481 } 5486 }
5482 5487
5483 /* set mac address */ 5488 /* set mac address */