Re: [patch 22/22] NET: DM9000: Show the MAC address source after printing MAC

2007-12-07 Thread Ben Dooks
On Fri, Nov 23, 2007 at 08:43:04PM -0500, Jeff Garzik wrote:
> ACK patches 16-22

Is reposting here ok to get these queued for the next kernel
release, or are there people to CC: for this?

-- 
Ben ([EMAIL PROTECTED], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 22/22] NET: DM9000: Show the MAC address source after printing MAC

2007-11-23 Thread Jeff Garzik

ACK patches 16-22


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 22/22] NET: DM9000: Show the MAC address source after printing MAC

2007-11-19 Thread Ben Dooks
Show whether the MAC address was read from the EEPROM or
the onboard PAR registers.

Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>

Index: linux-2.6.23-quilt5/drivers/net/dm9000.c
===
--- linux-2.6.23-quilt5.orig/drivers/net/dm9000.c
+++ linux-2.6.23-quilt5/drivers/net/dm9000.c
@@ -515,6 +515,7 @@ dm9000_probe(struct platform_device *pde
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;
@@ -696,13 +697,16 @@ dm9000_probe(struct platform_device *pde
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);
}
@@ -719,7 +723,7 @@ dm9000_probe(struct platform_device *pde
   ndev->name,  db->io_addr, db->io_data, ndev->irq);
for (i = 0; i < 5; i++)
printk("%02x:", ndev->dev_addr[i]);
-   printk("%02x\n", ndev->dev_addr[5]);
+   printk("%02x (%s)\n", ndev->dev_addr[5], mac_src);
}
return 0;
 

-- 
Ben ([EMAIL PROTECTED], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html