Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85618
b: refs/heads/master
c: 179c743
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Jeff Garzik committed Feb 11, 2008
1 parent 7db1dee commit ea64600
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 513b6bee0156812bce4f38c497dfc7cf9ee9a609
refs/heads/master: 179c743ff11b7ef3c0df4748b28c761a5fe19b11
10 changes: 7 additions & 3 deletions trunk/drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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;

Expand Down

0 comments on commit ea64600

Please sign in to comment.