lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230112100100.180708-1-bjorn@mork.no>
Date:   Thu, 12 Jan 2023 11:01:00 +0100
From:   Bjørn Mork <bjorn@...k.no>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Andre Przywara <andre.przywara@....com>,
        Paolo Abeni <pabeni@...hat.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bjørn Mork <bjorn@...k.no>
Subject: [PATCH net-next] r8152; preserve device list format

This is a partial revert of commit ec51fbd1b8a2 ("r8152:
add USB device driver for config selection")

Keep a simplified version of the REALTEK_USB_DEVICE macro
to avoid unnecessary reformatting of the device list. This
makes new device ID additions apply cleanly across driver
versions.

Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection")
Signed-off-by: Bjørn Mork <bjorn@...k.no>
---
The patch in
https://lore.kernel.org/lkml/20230111133228.190801-1-andre.przywara@arm.com/
will apply cleanly on top of this.

This fix will also prevent a lot of stable backporting hassle.

Sorry for not thinking the change completely through before
submitting.  I should never have touched the rtl8152_table.


Bjørn

 drivers/net/usb/r8152.c | 48 +++++++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 66e70b5f8417..3d4631dae00f 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9817,34 +9817,36 @@ static void rtl8152_disconnect(struct usb_interface *intf)
 	}
 }
 
+#define REALTEK_USB_DEVICE(vend, prod)	{ USB_DEVICE(vend, prod) }
+
 /* table of devices that work with this driver */
 static const struct usb_device_id rtl8152_table[] = {
 	/* Realtek */
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8050) },
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8053) },
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8152) },
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8153) },
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8155) },
-	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x8156) },
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8050),
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8053),
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152),
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153),
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8155),
+	REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8156),
 
 	/* Microsoft */
-	{ USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab) },
-	{ USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6) },
-	{ USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927) },
-	{ USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x304f) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x3054) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x3062) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x3069) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x3082) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x7205) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x720c) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x7214) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0x721e) },
-	{ USB_DEVICE(VENDOR_ID_LENOVO,  0xa387) },
-	{ USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) },
-	{ USB_DEVICE(VENDOR_ID_NVIDIA,  0x09ff) },
-	{ USB_DEVICE(VENDOR_ID_TPLINK,  0x0601) },
+	REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab),
+	REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6),
+	REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927),
+	REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x304f),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3054),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3062),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3069),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x3082),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x7205),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x720c),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x7214),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x721e),
+	REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0xa387),
+	REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041),
+	REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA,  0x09ff),
+	REALTEK_USB_DEVICE(VENDOR_ID_TPLINK,  0x0601),
 	{}
 };
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ