diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-02-04 19:02:23 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-11 11:06:37 -0500 |
commit | 179c743ff11b7ef3c0df4748b28c761a5fe19b11 (patch) | |
tree | 02f9d1d89a2e0848b029ee8feeb06f63afd0cc86 /drivers | |
parent | 513b6bee0156812bce4f38c497dfc7cf9ee9a609 (diff) |
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')
-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 8e8078283465..1fe305ca2cf0 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -509,6 +509,7 @@ dm9000_probe(struct platform_device *pdev) | |||
509 | struct dm9000_plat_data *pdata = pdev->dev.platform_data; | 509 | struct dm9000_plat_data *pdata = pdev->dev.platform_data; |
510 | struct board_info *db; /* Point a board information structure */ | 510 | struct board_info *db; /* Point a board information structure */ |
511 | struct net_device *ndev; | 511 | struct net_device *ndev; |
512 | const unsigned char *mac_src; | ||
512 | unsigned long base; | 513 | unsigned long base; |
513 | int ret = 0; | 514 | int ret = 0; |
514 | int iosize; | 515 | int iosize; |
@@ -687,13 +688,16 @@ dm9000_probe(struct platform_device *pdev) | |||
687 | db->mii.mdio_read = dm9000_phy_read; | 688 | db->mii.mdio_read = dm9000_phy_read; |
688 | db->mii.mdio_write = dm9000_phy_write; | 689 | db->mii.mdio_write = dm9000_phy_write; |
689 | 690 | ||
691 | mac_src = "eeprom"; | ||
692 | |||
690 | /* try reading the node address from the attached EEPROM */ | 693 | /* try reading the node address from the attached EEPROM */ |
691 | for (i = 0; i < 6; i += 2) | 694 | for (i = 0; i < 6; i += 2) |
692 | dm9000_read_eeprom(db, i / 2, ndev->dev_addr+i); | 695 | dm9000_read_eeprom(db, i / 2, ndev->dev_addr+i); |
693 | 696 | ||
694 | if (!is_valid_ether_addr(ndev->dev_addr)) { | 697 | if (!is_valid_ether_addr(ndev->dev_addr)) { |
695 | /* try reading from mac */ | 698 | /* try reading from mac */ |
696 | 699 | ||
700 | mac_src = "chip"; | ||
697 | for (i = 0; i < 6; i++) | 701 | for (i = 0; i < 6; i++) |
698 | ndev->dev_addr[i] = ior(db, i+DM9000_PAR); | 702 | ndev->dev_addr[i] = ior(db, i+DM9000_PAR); |
699 | } | 703 | } |
@@ -707,9 +711,9 @@ dm9000_probe(struct platform_device *pdev) | |||
707 | 711 | ||
708 | if (ret == 0) { | 712 | if (ret == 0) { |
709 | DECLARE_MAC_BUF(mac); | 713 | DECLARE_MAC_BUF(mac); |
710 | printk("%s: dm9000 at %p,%p IRQ %d MAC: %s\n", | 714 | printk("%s: dm9000 at %p,%p IRQ %d MAC: %s (%s)\n", |
711 | ndev->name, db->io_addr, db->io_data, ndev->irq, | 715 | ndev->name, db->io_addr, db->io_data, ndev->irq, |
712 | print_mac(mac, ndev->dev_addr)); | 716 | print_mac(mac, ndev->dev_addr), mac_src); |
713 | } | 717 | } |
714 | return 0; | 718 | return 0; |
715 | 719 | ||