diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-02-05 00:02:23 +0000 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-11 11:06:37 -0500 |
commit | 179c743ff11b7ef3c0df4748b28c761a5fe19b11 (patch) | |
tree | 02f9d1d89a2e0848b029ee8feeb06f63afd0cc86 /drivers/net/dm9000.c | |
parent | 513b6bee0156812bce4f38c497dfc7cf9ee9a609 (diff) | |
download | op-kernel-dev-179c743ff11b7ef3c0df4748b28c761a5fe19b11.zip op-kernel-dev-179c743ff11b7ef3c0df4748b28c761a5fe19b11.tar.gz |
DM9000: Show the MAC address source after printing MAC
Show whether the MAC address was read from the EEPROM or
the onboard PAR registers.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/dm9000.c')
-rw-r--r-- | drivers/net/dm9000.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 8e80782..1fe305c 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -509,6 +509,7 @@ dm9000_probe(struct platform_device *pdev) struct dm9000_plat_data *pdata = pdev->dev.platform_data; struct board_info *db; /* Point a board information structure */ struct net_device *ndev; + const unsigned char *mac_src; unsigned long base; int ret = 0; int iosize; @@ -687,13 +688,16 @@ dm9000_probe(struct platform_device *pdev) db->mii.mdio_read = dm9000_phy_read; db->mii.mdio_write = dm9000_phy_write; + mac_src = "eeprom"; + /* try reading the node address from the attached EEPROM */ for (i = 0; i < 6; i += 2) dm9000_read_eeprom(db, i / 2, ndev->dev_addr+i); if (!is_valid_ether_addr(ndev->dev_addr)) { /* try reading from mac */ - + + mac_src = "chip"; for (i = 0; i < 6; i++) ndev->dev_addr[i] = ior(db, i+DM9000_PAR); } @@ -707,9 +711,9 @@ dm9000_probe(struct platform_device *pdev) if (ret == 0) { DECLARE_MAC_BUF(mac); - printk("%s: dm9000 at %p,%p IRQ %d MAC: %s\n", + printk("%s: dm9000 at %p,%p IRQ %d MAC: %s (%s)\n", ndev->name, db->io_addr, db->io_data, ndev->irq, - print_mac(mac, ndev->dev_addr)); + print_mac(mac, ndev->dev_addr), mac_src); } return 0; |