lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] net: usb: r8152: Set probe mode to sync
Date
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
\
 
 \ /
  Last update: 2022-01-05 15:25    [W:0.064 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site