* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
[not found] <1476993351-23065-1-git-send-email-jhofstee@victronenergy.com>
@ 2016-10-21 6:38 ` Tony Lindgren
2016-10-21 7:36 ` Jeroen Hofstee
0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2016-10-21 6:38 UTC (permalink / raw)
To: Jeroen Hofstee
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
* Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
> Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
> id to common file") did not only move the code for an am3517, it also
> added the slave parameter, resulting in a invalid (all zero) mac address
> being returned. So change it back to always read from slave zero, so it
> works again.
Hmm doesn't this now break it for cpsw with two instances? We may need
am3517 specific quirk flag instead?
Regards,
Tony
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
2016-10-21 6:38 ` [PATCH] net: cpsw: fix obtaining mac address for am3517 Tony Lindgren
@ 2016-10-21 7:36 ` Jeroen Hofstee
0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2016-10-21 7:36 UTC (permalink / raw)
To: Tony Lindgren
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
Hello Tony,
On 21-10-16 08:38, Tony Lindgren wrote:
> * Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
>> Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
>> id to common file") did not only move the code for an am3517, it also
>> added the slave parameter, resulting in a invalid (all zero) mac address
>> being returned. So change it back to always read from slave zero, so it
>> works again.
> Hmm doesn't this now break it for cpsw with two instances?
>
Yes, well, they get the same mac address at least. But does it matter?
This changes davinci_emac_3517_get_macid, the only way to get there
is:
if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr)
and the only user of ti,am3517-emac is arch/arm/boot/dts/am3517.dtsi,
which only has one emac. So the change is already am3517 specific.
> We may need am3517 specific quirk flag instead?
Given above, it is already am3517 specific. Let me know if you prefer this
route then I will have a look at it.
Regards,
Jeroen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
@ 2016-10-21 7:36 ` Jeroen Hofstee
0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2016-10-21 7:36 UTC (permalink / raw)
To: Tony Lindgren
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
Hello Tony,
On 21-10-16 08:38, Tony Lindgren wrote:
> * Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
>> Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
>> id to common file") did not only move the code for an am3517, it also
>> added the slave parameter, resulting in a invalid (all zero) mac address
>> being returned. So change it back to always read from slave zero, so it
>> works again.
> Hmm doesn't this now break it for cpsw with two instances?
>
Yes, well, they get the same mac address at least. But does it matter?
This changes davinci_emac_3517_get_macid, the only way to get there
is:
if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr)
and the only user of ti,am3517-emac is arch/arm/boot/dts/am3517.dtsi,
which only has one emac. So the change is already am3517 specific.
> We may need am3517 specific quirk flag instead?
Given above, it is already am3517 specific. Let me know if you prefer this
route then I will have a look at it.
Regards,
Jeroen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
2016-10-21 7:36 ` Jeroen Hofstee
(?)
@ 2016-10-21 7:53 ` Tony Lindgren
2016-10-21 9:30 ` Jeroen Hofstee
-1 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2016-10-21 7:53 UTC (permalink / raw)
To: Jeroen Hofstee
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
* Jeroen Hofstee <jhofstee@victronenergy.com> [161021 00:37]:
> Hello Tony,
>
> On 21-10-16 08:38, Tony Lindgren wrote:
> > * Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
> > > Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
> > > id to common file") did not only move the code for an am3517, it also
> > > added the slave parameter, resulting in a invalid (all zero) mac address
> > > being returned. So change it back to always read from slave zero, so it
> > > works again.
> > Hmm doesn't this now break it for cpsw with two instances?
> >
>
> Yes, well, they get the same mac address at least. But does it matter?
> This changes davinci_emac_3517_get_macid, the only way to get there
> is:
>
> if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
> return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr)
>
> and the only user of ti,am3517-emac is arch/arm/boot/dts/am3517.dtsi,
> which only has one emac. So the change is already am3517 specific.
>
> > We may need am3517 specific quirk flag instead?
>
> Given above, it is already am3517 specific. Let me know if you prefer this
> route then I will have a look at it.
Oh OK thanks for explaining it :) As it's already am3517 specific:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
2016-10-21 7:53 ` Tony Lindgren
@ 2016-10-21 9:30 ` Jeroen Hofstee
0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2016-10-21 9:30 UTC (permalink / raw)
To: Tony Lindgren
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
Hello Tony,
On 21-10-16 09:53, Tony Lindgren wrote:
> * Jeroen Hofstee <jhofstee@victronenergy.com> [161021 00:37]:
>> Hello Tony,
>>
>> On 21-10-16 08:38, Tony Lindgren wrote:
>>> * Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
>>>> Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
>>>> id to common file") did not only move the code for an am3517, it also
>>>> added the slave parameter, resulting in a invalid (all zero) mac address
>>>> being returned. So change it back to always read from slave zero, so it
>>>> works again.
>>> Hmm doesn't this now break it for cpsw with two instances?
>>>
>> Yes, well, they get the same mac address at least. But does it matter?
>> This changes davinci_emac_3517_get_macid, the only way to get there
>> is:
>>
>> if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
>> return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr)
>>
>> and the only user of ti,am3517-emac is arch/arm/boot/dts/am3517.dtsi,
>> which only has one emac. So the change is already am3517 specific.
>>
>>> We may need am3517 specific quirk flag instead?
>> Given above, it is already am3517 specific. Let me know if you prefer this
>> route then I will have a look at it.
> Oh OK thanks for explaining it :) As it's already am3517 specific:
>
> Acked-by: Tony Lindgren <tony@atomide.com>
Aaah, lets wait a sec. I just saw there is another user of this function,
so above is simply not true....
if (of_machine_is_compatible("ti,dra7"))
return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr);
So let me check if I don't break that one..... or better, let me send a
v2, which
changes the caller to pass slave as 0 here?
if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr);
Regards,
Jeroen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
@ 2016-10-21 9:30 ` Jeroen Hofstee
0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Hofstee @ 2016-10-21 9:30 UTC (permalink / raw)
To: Tony Lindgren
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
Hello Tony,
On 21-10-16 09:53, Tony Lindgren wrote:
> * Jeroen Hofstee <jhofstee@victronenergy.com> [161021 00:37]:
>> Hello Tony,
>>
>> On 21-10-16 08:38, Tony Lindgren wrote:
>>> * Jeroen Hofstee <jhofstee@victronenergy.com> [161020 12:57]:
>>>> Commit b6745f6e4e63 ("drivers: net: cpsw: davinci_emac: move reading mac
>>>> id to common file") did not only move the code for an am3517, it also
>>>> added the slave parameter, resulting in a invalid (all zero) mac address
>>>> being returned. So change it back to always read from slave zero, so it
>>>> works again.
>>> Hmm doesn't this now break it for cpsw with two instances?
>>>
>> Yes, well, they get the same mac address at least. But does it matter?
>> This changes davinci_emac_3517_get_macid, the only way to get there
>> is:
>>
>> if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
>> return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr)
>>
>> and the only user of ti,am3517-emac is arch/arm/boot/dts/am3517.dtsi,
>> which only has one emac. So the change is already am3517 specific.
>>
>>> We may need am3517 specific quirk flag instead?
>> Given above, it is already am3517 specific. Let me know if you prefer this
>> route then I will have a look at it.
> Oh OK thanks for explaining it :) As it's already am3517 specific:
>
> Acked-by: Tony Lindgren <tony@atomide.com>
Aaah, lets wait a sec. I just saw there is another user of this function,
so above is simply not true....
if (of_machine_is_compatible("ti,dra7"))
return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr);
So let me check if I don't break that one..... or better, let me send a
v2, which
changes the caller to pass slave as 0 here?
if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr);
Regards,
Jeroen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: cpsw: fix obtaining mac address for am3517
2016-10-21 9:30 ` Jeroen Hofstee
(?)
@ 2016-10-21 9:51 ` Tony Lindgren
-1 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2016-10-21 9:51 UTC (permalink / raw)
To: Jeroen Hofstee
Cc: netdev, Mugunthan V N, Grygorii Strashko, linux-omap, linux-kernel
* Jeroen Hofstee <jhofstee@victronenergy.com> [161021 02:31]:
> Aaah, lets wait a sec. I just saw there is another user of this function,
> so above is simply not true....
>
> if (of_machine_is_compatible("ti,dra7"))
> return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr);
Oh OK, then this will produce duplicate macs.
> So let me check if I don't break that one..... or better, let me send a v2,
> which
> changes the caller to pass slave as 0 here?
>
> if (of_device_is_compatible(dev->of_node, "ti,am3517-emac"))
> return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr);
>
Yeah that sounds good to me.
Regards,
Tony
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-10-21 10:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1476993351-23065-1-git-send-email-jhofstee@victronenergy.com>
2016-10-21 6:38 ` [PATCH] net: cpsw: fix obtaining mac address for am3517 Tony Lindgren
2016-10-21 7:36 ` Jeroen Hofstee
2016-10-21 7:36 ` Jeroen Hofstee
2016-10-21 7:53 ` Tony Lindgren
2016-10-21 9:30 ` Jeroen Hofstee
2016-10-21 9:30 ` Jeroen Hofstee
2016-10-21 9:51 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.