aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tc35815.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-04-10 11:24:24 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:06:49 -0400
commit958eb80bd2a5bb086cd3f42ae06786cfe75b87b8 (patch)
treeecf57eaf0d375c54e54ee9934160336899b7ff65 /drivers/net/tc35815.c
parentc201abd9a49e72824d274bc1a91b8ba300e37d9a (diff)
tc35815: Use print_mac() helper
Use print_mac() and DECLARE_MAC_BUF(). Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/tc35815.c')
-rw-r--r--drivers/net/tc35815.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index f0e9566f787e..1f623e5af948 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -664,6 +664,7 @@ static int __devinit tc35815_init_one (struct pci_dev *pdev,
664 struct tc35815_local *lp; 664 struct tc35815_local *lp;
665 int rc; 665 int rc;
666 unsigned long mmio_start, mmio_end, mmio_flags, mmio_len; 666 unsigned long mmio_start, mmio_end, mmio_flags, mmio_len;
667 DECLARE_MAC_BUF(mac);
667 668
668 static int printed_version; 669 static int printed_version;
669 if (!printed_version++) { 670 if (!printed_version++) {
@@ -770,15 +771,11 @@ static int __devinit tc35815_init_one (struct pci_dev *pdev,
770 goto err_out_unmap; 771 goto err_out_unmap;
771 772
772 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 773 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
773 printk(KERN_INFO "%s: %s at 0x%lx, " 774 printk(KERN_INFO "%s: %s at 0x%lx, %s, IRQ %d\n",
774 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
775 "IRQ %d\n",
776 dev->name, 775 dev->name,
777 board_info[ent->driver_data].name, 776 board_info[ent->driver_data].name,
778 dev->base_addr, 777 dev->base_addr,
779 dev->dev_addr[0], dev->dev_addr[1], 778 print_mac(mac, dev->dev_addr),
780 dev->dev_addr[2], dev->dev_addr[3],
781 dev->dev_addr[4], dev->dev_addr[5],
782 dev->irq); 779 dev->irq);
783 780
784 setup_timer(&lp->timer, tc35815_timer, (unsigned long) dev); 781 setup_timer(&lp->timer, tc35815_timer, (unsigned long) dev);
@@ -1127,17 +1124,14 @@ panic_queues(struct net_device *dev)
1127} 1124}
1128#endif 1125#endif
1129 1126
1130static void print_eth(char *add) 1127static void print_eth(const u8 *add)
1131{ 1128{
1132 int i; 1129 DECLARE_MAC_BUF(mac);
1133 1130
1134 printk("print_eth(%p)\n", add); 1131 printk(KERN_DEBUG "print_eth(%p)\n", add);
1135 for (i = 0; i < 6; i++) 1132 printk(KERN_DEBUG " %s =>", print_mac(mac, add + 6));
1136 printk(" %2.2X", (unsigned char) add[i + 6]); 1133 printk(KERN_CONT " %s : %02x%02x\n",
1137 printk(" =>"); 1134 print_mac(mac, add), add[12], add[13]);
1138 for (i = 0; i < 6; i++)
1139 printk(" %2.2X", (unsigned char) add[i]);
1140 printk(" : %2.2X%2.2X\n", (unsigned char) add[12], (unsigned char) add[13]);
1141} 1135}
1142 1136
1143static int tc35815_tx_full(struct net_device *dev) 1137static int tc35815_tx_full(struct net_device *dev)
@@ -1992,15 +1986,13 @@ static void tc35815_set_cam_entry(struct net_device *dev, int index, unsigned ch
1992 int cam_index = index * 6; 1986 int cam_index = index * 6;
1993 u32 cam_data; 1987 u32 cam_data;
1994 u32 saved_addr; 1988 u32 saved_addr;
1989 DECLARE_MAC_BUF(mac);
1990
1995 saved_addr = tc_readl(&tr->CAM_Adr); 1991 saved_addr = tc_readl(&tr->CAM_Adr);
1996 1992
1997 if (netif_msg_hw(lp)) { 1993 if (netif_msg_hw(lp))
1998 int i; 1994 printk(KERN_DEBUG "%s: CAM %d: %s\n",
1999 printk(KERN_DEBUG "%s: CAM %d:", dev->name, index); 1995 dev->name, index, print_mac(mac, addr));
2000 for (i = 0; i < 6; i++)
2001 printk(" %02x", addr[i]);
2002 printk("\n");
2003 }
2004 if (index & 1) { 1996 if (index & 1) {
2005 /* read modify write */ 1997 /* read modify write */
2006 tc_writel(cam_index - 2, &tr->CAM_Adr); 1998 tc_writel(cam_index - 2, &tr->CAM_Adr);