HomeFreeBSD

Teach if_smsc to get MAC from bootargs.

Description

Teach if_smsc to get MAC from bootargs.

Some Raspberry Pi pass smsc95xx.macaddr=XX:XX:XX:XX:XX:XX as bootargs.
Use this if no ethernet address is found in an EEPROM.
As last resort fall back to ether_gen_addr() instead of random MAC.

(cherry picked from commit 3878bbf1bb9e68f8579b57cde7d4e5c77de93320)

if_smsc: fix build on armv6 & armv7

compile error was:
/usr/src/sys/dev/usb/net/if_smsc.c:1597:40: error: format specifies type 'unsigned long' but the argument has type 'ssize_t' (aka 'int') [-Werror,-Wformat]

"failed alloc for bootargs (%lu)", len);
                            ~~~    ^~~
                            %zd

(cherry picked from commit 8a0ee306227a17a998bdc7af2275fd94b9164342)

PR: 274092
Reported by: Patrick M. Hausen (via ML)
Reviewed by: imp, karels, zlei
Tested by: Patrick M. Hausen
Approved by: karels
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D42463

Details

Provenance
ronald_klop.wsAuthored on Nov 4 2023, 2:14 PM
Reviewer
imp
Differential Revision
D42463: Teach if_smsc to get MAC from bootargs.
Parents
rGeefdc4a34875: fortune: update mailing list search url
Branches
Unknown
Tags
Unknown