Commit 0847467e authored by Olaf Hering's avatar Olaf Hering Committed by Jeff Garzik

[PATCH] mace register_netdev printk

small cosmetic fix for powermac mace network driver.

eth%d: MACE at 00:05:02:f4:1b:1d, chip revision 25.64
vs.
eth0: MACE at 00:05:02:f4:1b:1d, chip revision 25.64
parent d5b1f484
...@@ -172,15 +172,12 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *m ...@@ -172,15 +172,12 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *m
} }
dev->irq = macio_irq(mdev, 0); dev->irq = macio_irq(mdev, 0);
printk(KERN_INFO "%s: MACE at", dev->name);
rev = addr[0] == 0 && addr[1] == 0xA0; rev = addr[0] == 0 && addr[1] == 0xA0;
for (j = 0; j < 6; ++j) { for (j = 0; j < 6; ++j) {
dev->dev_addr[j] = rev? bitrev(addr[j]): addr[j]; dev->dev_addr[j] = rev? bitrev(addr[j]): addr[j];
printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]);
} }
mp->chipid = (in_8(&mp->mace->chipid_hi) << 8) | mp->chipid = (in_8(&mp->mace->chipid_hi) << 8) |
in_8(&mp->mace->chipid_lo); in_8(&mp->mace->chipid_lo);
printk(", chip revision %d.%d\n", mp->chipid >> 8, mp->chipid & 0xff);
mp = (struct mace_data *) dev->priv; mp = (struct mace_data *) dev->priv;
...@@ -259,10 +256,16 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *m ...@@ -259,10 +256,16 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *m
rc = register_netdev(dev); rc = register_netdev(dev);
if (rc) { if (rc) {
printk(KERN_ERR "Cannot register net device, aborting.\n"); printk(KERN_ERR "MACE: Cannot register net device, aborting.\n");
goto err_free_rx_irq; goto err_free_rx_irq;
} }
printk(KERN_INFO "%s: MACE at", dev->name);
for (j = 0; j < 6; ++j) {
printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]);
}
printk(", chip revision %d.%d\n", mp->chipid >> 8, mp->chipid & 0xff);
return 0; return 0;
err_free_rx_irq: err_free_rx_irq:
......
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