* [PATCH net-next] net: usb: ax88179_178a: write mac to hardware in get_mac_addr
@ 2019-10-09 14:15 Peter Fink
2019-10-10 10:38 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Peter Fink @ 2019-10-09 14:15 UTC (permalink / raw)
To: netdev; +Cc: pfink, davem
From: Peter Fink <pfink@christ-es.de>
When the MAC address is supplied via device tree or a random
MAC is generated it has to be written to the asix chip in
order to receive any data.
In the previous commit (9fb137a) this line was omitted
because it seemed to work perfectly fine without it.
But it was simply not detected because the chip keeps the mac
stored even beyond a reset and it was tested on a hardware
with an integrated UPS where the asix chip was permanently
powered on even throughout power cycles.
Signed-off-by: Peter Fink <pfink@christ-es.de>
---
drivers/net/usb/ax88179_178a.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 5a58766..c5a6e75 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1235,6 +1235,9 @@ static void ax88179_get_mac_addr(struct usbnet *dev)
netdev_info(dev->net, "invalid MAC address, using random\n");
eth_hw_addr_random(dev->net);
}
+
+ ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN, ETH_ALEN,
+ dev->net->dev_addr);
}
static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: usb: ax88179_178a: write mac to hardware in get_mac_addr
2019-10-09 14:15 [PATCH net-next] net: usb: ax88179_178a: write mac to hardware in get_mac_addr Peter Fink
@ 2019-10-10 10:38 ` Sergei Shtylyov
2019-10-10 12:11 ` Peter Fink
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2019-10-10 10:38 UTC (permalink / raw)
To: Peter Fink, netdev; +Cc: pfink, davem
Hello!
On 09.10.2019 17:15, Peter Fink wrote:
> From: Peter Fink <pfink@christ-es.de>
>
> When the MAC address is supplied via device tree or a random
> MAC is generated it has to be written to the asix chip in
> order to receive any data.
>
> In the previous commit (9fb137a) this line was omitted
It's not how you should cite the commit, here's how:
<12-digit SHA1> ("<commit-summary>")
> because it seemed to work perfectly fine without it.
> But it was simply not detected because the chip keeps the mac
> stored even beyond a reset and it was tested on a hardware
> with an integrated UPS where the asix chip was permanently
> powered on even throughout power cycles.
>
> Signed-off-by: Peter Fink <pfink@christ-es.de>
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: usb: ax88179_178a: write mac to hardware in get_mac_addr
2019-10-10 10:38 ` Sergei Shtylyov
@ 2019-10-10 12:11 ` Peter Fink
0 siblings, 0 replies; 3+ messages in thread
From: Peter Fink @ 2019-10-10 12:11 UTC (permalink / raw)
To: Sergei Shtylyov, netdev; +Cc: pfink, davem
Hello Sergei,
thanks for the hint. Will correct it and send a v2.
Best regards, Peter
Am 10.10.19 um 12:38 schrieb Sergei Shtylyov:
> Hello!
>
> On 09.10.2019 17:15, Peter Fink wrote:
>
>> From: Peter Fink <pfink@christ-es.de>
>>
>> When the MAC address is supplied via device tree or a random
>> MAC is generated it has to be written to the asix chip in
>> order to receive any data.
>>
>> In the previous commit (9fb137a) this line was omitted
>
> It's not how you should cite the commit, here's how:
>
> <12-digit SHA1> ("<commit-summary>")
>
>> because it seemed to work perfectly fine without it.
>> But it was simply not detected because the chip keeps the mac
>> stored even beyond a reset and it was tested on a hardware
>> with an integrated UPS where the asix chip was permanently
>> powered on even throughout power cycles.
>>
>> Signed-off-by: Peter Fink <pfink@christ-es.de>
> [...]
>
> MBR, Sergei
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-10 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 14:15 [PATCH net-next] net: usb: ax88179_178a: write mac to hardware in get_mac_addr Peter Fink
2019-10-10 10:38 ` Sergei Shtylyov
2019-10-10 12:11 ` Peter Fink
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).