Commit 958eb80b authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Jeff Garzik

tc35815: Use print_mac() helper

Use print_mac() and DECLARE_MAC_BUF().
Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent c201abd9
......@@ -664,6 +664,7 @@ static int __devinit tc35815_init_one (struct pci_dev *pdev,
struct tc35815_local *lp;
int rc;
unsigned long mmio_start, mmio_end, mmio_flags, mmio_len;
DECLARE_MAC_BUF(mac);
static int printed_version;
if (!printed_version++) {
......@@ -770,15 +771,11 @@ static int __devinit tc35815_init_one (struct pci_dev *pdev,
goto err_out_unmap;
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
printk(KERN_INFO "%s: %s at 0x%lx, "
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
"IRQ %d\n",
printk(KERN_INFO "%s: %s at 0x%lx, %s, IRQ %d\n",
dev->name,
board_info[ent->driver_data].name,
dev->base_addr,
dev->dev_addr[0], dev->dev_addr[1],
dev->dev_addr[2], dev->dev_addr[3],
dev->dev_addr[4], dev->dev_addr[5],
print_mac(mac, dev->dev_addr),
dev->irq);
setup_timer(&lp->timer, tc35815_timer, (unsigned long) dev);
......@@ -1127,17 +1124,14 @@ panic_queues(struct net_device *dev)
}
#endif
static void print_eth(char *add)
static void print_eth(const u8 *add)
{
int i;
DECLARE_MAC_BUF(mac);
printk("print_eth(%p)\n", add);
for (i = 0; i < 6; i++)
printk(" %2.2X", (unsigned char) add[i + 6]);
printk(" =>");
for (i = 0; i < 6; i++)
printk(" %2.2X", (unsigned char) add[i]);
printk(" : %2.2X%2.2X\n", (unsigned char) add[12], (unsigned char) add[13]);
printk(KERN_DEBUG "print_eth(%p)\n", add);
printk(KERN_DEBUG " %s =>", print_mac(mac, add + 6));
printk(KERN_CONT " %s : %02x%02x\n",
print_mac(mac, add), add[12], add[13]);
}
static 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
int cam_index = index * 6;
u32 cam_data;
u32 saved_addr;
DECLARE_MAC_BUF(mac);
saved_addr = tc_readl(&tr->CAM_Adr);
if (netif_msg_hw(lp)) {
int i;
printk(KERN_DEBUG "%s: CAM %d:", dev->name, index);
for (i = 0; i < 6; i++)
printk(" %02x", addr[i]);
printk("\n");
}
if (netif_msg_hw(lp))
printk(KERN_DEBUG "%s: CAM %d: %s\n",
dev->name, index, print_mac(mac, addr));
if (index & 1) {
/* read modify write */
tc_writel(cam_index - 2, &tr->CAM_Adr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment