From: Aaron Ma <aaron.ma@canonical.com>
To: aaron.ma@canonical.com, kuba@kernel.org,
henning.schild@siemens.com, linux-usb@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: davem@davemloft.net, hayeswang@realtek.com, tiwai@suse.de
Subject: [PATCH 2/3] net: usb: r8152: Set probe mode to sync
Date: Wed, 5 Jan 2022 22:23:50 +0800 [thread overview]
Message-ID: <20220105142351.8026-2-aaron.ma@canonical.com> (raw)
In-Reply-To: <20220105142351.8026-1-aaron.ma@canonical.com>
To avoid the race of get passthrough MAC,
set probe mode to sync to check the used MAC address.
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
drivers/net/usb/r8152.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 91f4b2761f8e..3fbce3dbc04d 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -29,6 +29,8 @@
#include <crypto/hash.h>
#include <linux/usb/r8152.h>
+static struct usb_driver rtl8152_driver;
+
/* Information for net-next */
#define NETNEXT_VERSION "12"
@@ -9545,6 +9547,9 @@ static int rtl8152_probe(struct usb_interface *intf,
struct r8152 *tp;
struct net_device *netdev;
int ret;
+ struct device_driver *rtl8152_drv = &rtl8152_driver.drvwrap.driver;
+
+ rtl8152_drv->probe_type = PROBE_FORCE_SYNCHRONOUS;
if (version == RTL_VER_UNKNOWN)
return -ENODEV;
--
2.30.2
next prev parent reply other threads:[~2022-01-05 14:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 14:23 [PATCH 1/3] net: usb: r8152: Check used MAC passthrough address Aaron Ma
2022-01-05 14:23 ` Aaron Ma [this message]
2022-01-05 14:23 ` [PATCH 3/3] net: usb: r8152: remove unused definition Aaron Ma
2022-01-05 14:51 ` Henning Schild
2022-01-05 15:06 ` Greg KH
2022-01-05 14:52 ` Greg KH
2022-01-05 14:48 ` [PATCH 1/3] net: usb: r8152: Check used MAC passthrough address Henning Schild
-- strict thread matches above, loose matches on Subject: below --
2022-01-05 15:14 [PATCH 1/3 v3] " Aaron Ma
2022-01-05 15:14 ` [PATCH 2/3] net: usb: r8152: Set probe mode to sync Aaron Ma
2022-01-05 15:33 ` Greg KH
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=20220105142351.8026-2-aaron.ma@canonical.com \
--to=aaron.ma@canonical.com \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=henning.schild@siemens.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.