[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190422133947.0b6aaf82@cakuba.netronome.com>
Date: Mon, 22 Apr 2019 13:39:47 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: crag0715@...il.com
Cc: linux-usb@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, hayeswang@...ltek.com,
mario_limonciello@...l.com, "Crag.Wang" <crag.wang@...l.com>,
"David S. Miller" <davem@...emloft.net>,
Simon Glass <sjg@...omium.org>,
Grant Grundler <grundler@...omium.org>,
Sean Paul <seanpaul@...omium.org>,
David Chen <david.chen7@...l.com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Charles Hyde <charles.hyde@...l.corp-partner.google.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
zhong jiang <zhongjiang@...wei.com>
Subject: Re: [PATCH v2 1/1] r8152: sync sa_family with the media type of
network device
On Mon, 22 Apr 2019 13:03:43 +0800, crag0715@...il.com wrote:
> From: "Crag.Wang" <crag.wang@...l.com>
>
> Without this patch the socket address family sporadically gets wrong
> value ends up the dev_set_mac_address() fails to set the desired MAC
> address.
>
> Signed-off-by: Crag.Wang <crag.wang@...l.com>
Code looks reasonable. This must have been caused by:
Fixes: 25766271e42f ("r8152: Refresh MAC address during USBDEVFS_RESET")
which is still in net-next. In the future please make sure you read:
https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html
In particular:
https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html#q-how-do-i-indicate-which-tree-net-vs-net-next-my-patch-should-be-in
To assure smooth flow of your patches into the tree :)
Reviewed-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 4c63b40d5e00..41fb39ce69c9 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -1225,6 +1225,8 @@ static int determine_ethernet_addr(struct r8152 *tp, struct sockaddr *sa)
> struct net_device *dev = tp->netdev;
> int ret;
>
> + sa->sa_family = dev->type;
> +
> if (tp->version == RTL_VER_01) {
> ret = pla_ocp_read(tp, PLA_IDR, 8, sa->sa_data);
> } else {
Powered by blists - more mailing lists