From owner-freebsd-arm@freebsd.org Sun Nov 13 07:42:51 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BAEAC3F164 for ; Sun, 13 Nov 2016 07:42:51 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0362E1A0D for ; Sun, 13 Nov 2016 07:42:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 95C1A1FE022; Sun, 13 Nov 2016 08:42:46 +0100 (CET) Subject: Re: How to change MAC address on RPI-B? To: diffusae , freebsd-arm@freebsd.org References: <005701d23a7d$71400630$53c01290$@Kitz@xs4all.nl> <20161110065105.77a19e3b@X220.alogt.com> <000c01d23b3a$c06e1ef0$414a5cd0$@Kitz@xs4all.nl> <20161111094930.46f55a60@X220.alogt.com> <000f01d23c14$da3a6c00$8eaf4400$@Kitz@xs4all.nl> <445c56a4-2c35-cb4c-f729-950d4e758d8d@selasky.org> <8cc9d3c6-1c70-c9ac-a3a2-29f73e5ea9c3@t-online.de> From: Hans Petter Selasky Message-ID: <471aebe5-b890-4277-3269-977f8a8fefd4@selasky.org> Date: Sun, 13 Nov 2016 08:42:45 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <8cc9d3c6-1c70-c9ac-a3a2-29f73e5ea9c3@t-online.de> Content-Type: multipart/mixed; boundary="------------6AE8938A3A520DCFB4EEFBF7" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 07:42:51 -0000 This is a multi-part message in MIME format. --------------6AE8938A3A520DCFB4EEFBF7 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 11/12/16 23:45, diffusae wrote: > So, unfortunately it doesn't solve the problem. Or maybe I did something > wrong? I patched the wrong IOCTL, sorry. I have a RPI2 myself, and will fix this issue later today. Stay tuned. Meanwhile, can you test the new attached patch and revert the previous one? --HPS --------------6AE8938A3A520DCFB4EEFBF7 Content-Type: text/x-patch; name="if_smsc_mac.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="if_smsc_mac.diff" Index: sys/dev/usb/net/if_smsc.c =================================================================== --- sys/dev/usb/net/if_smsc.c (revision 308426) +++ sys/dev/usb/net/if_smsc.c (working copy) @@ -152,7 +152,7 @@ device_printf((sc)->sc_ue.ue_dev, "debug: " fmt, ##args); \ } while(0) #else -#define smsc_dbg_printf(sc, fmt, args...) +#define smsc_dbg_printf(sc, fmt, args...) do { } while (0) #endif #define smsc_warn_printf(sc, fmt, args...) \ @@ -822,7 +822,6 @@ return (0); } - /** * smsc_setmacaddress - Sets the mac address in the device * @sc: driver soft context @@ -905,6 +904,9 @@ SMSC_LOCK_ASSERT(sc, MA_OWNED); + if (smsc_setmacaddress(sc, IF_LLADDR(ifp))) + smsc_dbg_printf(sc, "setting MAC address failed\n"); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) return; --------------6AE8938A3A520DCFB4EEFBF7--