netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Hayes Wang <hayeswang@realtek.com>, Oliver Neukum <oneukum@suse.com>
Cc: USB list <linux-usb@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: handling MAC set by user space in reset_resume() of r8152
Date: Thu, 28 Jul 2022 10:54:30 +0200	[thread overview]
Message-ID: <4dfebefb-b4a4-ccdb-d0f7-015273710076@suse.com> (raw)
In-Reply-To: <353a10d11f2345c8acff717be4ade74a@realtek.com>



On 28.07.22 10:40, Hayes Wang wrote:
> Oliver Neukum <oneukum@suse.com>
>>> Date: Wed, 27 Jul 2022 13:29:42 +0200
>>> Subject: [PATCH] r8152: restore external MAC in reset_resume
>>>
>>> If user space has set the MAC of the interface,
>>> reset_resume() must restore that setting rather
>>> than redetermine the MAC like if te interface
>>> is probed regularly.
> 
> I think this patch conflicts with commit 25766271e42f ("r8152: Refresh
> MAC address during USBDEVFS_RESET"). The results would be changed.

Argh.
OK, thank you. Do you agree that a manually set MAC needs to be kept
even through a pre/post_reset() and reset_resume(), while a MAC passed
through needs to be reevaluated at pre/post_reset() but not at
reset_resume()

> Besides, I don't understand why you set tp->external_mac = false
> in rtl8152_down().

Frankly I need to undo the effect of ndo_set_mac_address()
at some time, but it is unclear to me how to return a network
interface to its "native" MAC.
Any ideas?

	Regards
		Oliver

  reply	other threads:[~2022-07-28  8:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 11:39 handling MAC set by user space in reset_resume() of r8152 Oliver Neukum
2022-07-27 18:34 ` Andrew Lunn
2022-07-28  8:40   ` Hayes Wang
2022-07-28  8:54     ` Oliver Neukum [this message]
2022-07-28  9:41       ` Hayes Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4dfebefb-b4a4-ccdb-d0f7-015273710076@suse.com \
    --to=oneukum@suse.com \
    --cc=hayeswang@realtek.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).