lkml.org 
[lkml]   [2009]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 8139cp: allow to set mac address on running device
Thu, Mar 12, 2009 at 06:11:21PM CET, mschmidt@redhat.com wrote:
>On Thu, 12 Mar 2009 17:27:31 +0100
>Jiri Pirko <jpirko@redhat.com> wrote:
>
>> + cpw32_f(MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr +
>> 0)));
>> + cpw32_f(MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr +
>> 4)));
>
>You're writing to the card, so using *_to_cpu looks suspicious.
Well, I'm using the same approach as it is already done in function
cp_init_hw(). Quote:

/* Restore our idea of the MAC address. */
cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));

Jirka
>
>Michal


\
 
 \ /
  Last update: 2009-03-12 18:51    [W:0.461 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site