[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220105151427.8373-2-aaron.ma@canonical.com>
Date: Wed, 5 Jan 2022 23:14:26 +0800
From: Aaron Ma <aaron.ma@...onical.com>
To: aaron.ma@...onical.com, kuba@...nel.org,
henning.schild@...mens.com, linux-usb@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: davem@...emloft.net, hayeswang@...ltek.com, tiwai@...e.de
Subject: [PATCH 2/3] net: usb: r8152: Set probe mode to sync
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@...onical.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 2483dc421dff..7cf2faf8d088 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"
@@ -9546,6 +9548,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
Powered by blists - more mailing lists