From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Tue, 27 Apr 2010 00:27:04 -0700 Subject: [U-Boot] [PATCH] net: altera_tse: add write_hwaddr support In-Reply-To: <1272348719-1810-1-git-send-email-thomas@wytron.com.tw> References: <1272348719-1810-1-git-send-email-thomas@wytron.com.tw> Message-ID: <4BD691C8.9050702@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Thomas, On 4/26/2010 11:11 PM, Thomas Chou wrote: > Signed-off-by: Thomas Chou > --- > drivers/net/altera_tse.c | 63 ++++++++++++++++++++++++++------------------- > 1 files changed, 36 insertions(+), 27 deletions(-) > > > static int tse_eth_init(struct eth_device *dev, bd_t * bd) > { > int dat; > @@ -830,33 +864,7 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd) > mac_dev->command_config.image = dat; > > /* Set the MAC address */ > - debug("Setting MAC address to 0x%x%x%x%x%x%x\n", > - dev->enetaddr[5], dev->enetaddr[4], > - dev->enetaddr[3], dev->enetaddr[2], > - dev->enetaddr[1], dev->enetaddr[0]); > - mac_dev->mac_addr_0 = ((dev->enetaddr[3])<< 24 | > - (dev->enetaddr[2])<< 16 | > - (dev->enetaddr[1])<< 8 | (dev->enetaddr[0])); > - > - mac_dev->mac_addr_1 = ((dev->enetaddr[5]<< 8 | > - (dev->enetaddr[4]))& 0xFFFF); > - > - /* Set the MAC address */ > - mac_dev->supp_mac_addr_0_0 = mac_dev->mac_addr_0; > - mac_dev->supp_mac_addr_0_1 = mac_dev->mac_addr_1; > - > - /* Set the MAC address */ > - mac_dev->supp_mac_addr_1_0 = mac_dev->mac_addr_0; > - mac_dev->supp_mac_addr_1_1 = mac_dev->mac_addr_1; > - > - /* Set the MAC address */ > - mac_dev->supp_mac_addr_2_0 = mac_dev->mac_addr_0; > - mac_dev->supp_mac_addr_2_1 = mac_dev->mac_addr_1; > - > - /* Set the MAC address */ > - mac_dev->supp_mac_addr_3_0 = mac_dev->mac_addr_0; > - mac_dev->supp_mac_addr_3_1 = mac_dev->mac_addr_1; > - > + tse_set_mac_address(dev); > Why is this needed? Do you see a situation where the user would 'setenv ethmacskip' and then actually use the interface? regards, Ben