| To: | Jeremy Martin <martinjd@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] fix tuntap oversight |
| From: | Jeff Garzik <jgarzik@xxxxxxxxx> |
| Date: | Mon, 12 Apr 2004 12:43:30 -0400 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| In-reply-to: | <20040412162916.GA5046@net-ronin.org> |
| References: | <20040412065947.GC18810@net-ronin.org> <20040412001551.05476658.davem@redhat.com> <20040412162916.GA5046@net-ronin.org> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 |
Jeremy Martin wrote:
On Mon, Apr 12, 2004 at 12:15:51AM -0700, David S. Miller wrote:
struct net_device::set_mac_address() is called inside rtnl_lock(). The safe thing to do is 1) read MAC address from eeprom on probe 2) write MAC address to hardware upon each dev->open() 3) use default eth_mac_addr() from net_init.c And the netif_running() check in eth_mac_addr() is correct, because it does not update the hardware MAC address (which in this API would be impossible). Normally the netif_running() check is for hardware that cannot update its MAC address safely during operation. Jeff |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] fix tuntap oversight, David S. Miller |
|---|---|
| Next by Date: | rudimentary ISR question, Steve Modica |
| Previous by Thread: | Re: [PATCH] fix tuntap oversight, David S. Miller |
| Next by Thread: | (no subject), Denis Vlasenko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |