diff --git a/include/kernel-6.1 b/include/kernel-6.1 index d84b0b21c43648..b42886811e3be7 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .68 -LINUX_KERNEL_HASH-6.1.68 = 365ff26a30e206de9b18489f45d38582a0a61b7c5919f8ab89295a47316784e1 +LINUX_VERSION-6.1 = .69 +LINUX_KERNEL_HASH-6.1.69 = 7e3d2694d18ce502068cc88a430da809abbd17d0773268524ebece442612b541 diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch b/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch index 7ea446516bf6ee..9d6f5c52dc62ad 100644 --- a/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch +++ b/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch @@ -181,7 +181,7 @@ Signed-off-by: Paolo Abeni dpaa2_switch_port_disconnect_mac(port_priv); else dpaa2_switch_port_connect_mac(port_priv); -@@ -3256,6 +3279,8 @@ static int dpaa2_switch_probe_port(struc +@@ -3249,6 +3272,8 @@ static int dpaa2_switch_probe_port(struc port_priv->netdev = port_netdev; port_priv->ethsw_data = ethsw; diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch b/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch index a4ad00ef4dcf24..f72f9e3a43cc57 100644 --- a/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch +++ b/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch @@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni } out: -@@ -2958,9 +2956,7 @@ static void dpaa2_switch_remove_port(str +@@ -2951,9 +2949,7 @@ static void dpaa2_switch_remove_port(str { struct ethsw_port_priv *port_priv = ethsw->ports[port_idx]; diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch index b884b8334bdd8a..1a2d4426abe8d2 100644 --- a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch @@ -589,15 +589,15 @@ SVN-Revision: 35130 * XXX skbs on the gro_list have all been parsed and pulled --- a/include/net/addrconf.h +++ b/include/net/addrconf.h -@@ -47,7 +47,7 @@ struct prefix_info { +@@ -52,7 +52,7 @@ struct prefix_info { __be32 reserved2; struct in6_addr prefix; -}; +} __attribute__((packed, aligned(2))); - #include - #include + /* rfc4861 4.6.2: IPv6 PIO is 32 bytes in size */ + static_assert(sizeof(struct prefix_info) == 32); --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -138,9 +138,9 @@ static inline int IP6_ECN_set_ce(struct diff --git a/target/linux/bcm27xx/patches-6.1/950-0188-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-6.1/950-0188-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index f8bdac6654711b..168bba5c4876df 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0188-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0188-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1369,6 +1372,9 @@ +@@ -1372,6 +1375,9 @@ #define USB_VENDOR_ID_XIAOMI 0x2717 #define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014 @@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell #define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c -@@ -41,6 +41,7 @@ static const struct hid_device_id hid_qu +@@ -42,6 +42,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS682), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS692), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM), HID_QUIRK_NOGET }, @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -199,6 +200,7 @@ static const struct hid_device_id hid_qu +@@ -200,6 +201,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET }, diff --git a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch index 10fee0adf6344f..99ec42fe488aec 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch @@ -121,7 +121,7 @@ Signed-off-by: T.J. Mercier static inline int lru_gen_from_seq(unsigned long seq) { return seq % MAX_NR_GENS; -@@ -297,6 +309,11 @@ static inline bool lru_gen_in_fault(void +@@ -302,6 +314,11 @@ static inline bool lru_gen_in_fault(void return false; } diff --git a/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch b/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch index aea6aa18e28fa9..faa7d1d9bf1f79 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-10-UPSTREAM-mm-add-vma_has_recency.patch @@ -62,7 +62,7 @@ Signed-off-by: T.J. Mercier --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -595,4 +595,12 @@ pte_install_uffd_wp_if_needed(struct vm_ +@@ -600,4 +600,12 @@ pte_install_uffd_wp_if_needed(struct vm_ #endif } diff --git a/target/linux/generic/backport-6.1/020-v6.3-11-UPSTREAM-mm-support-POSIX_FADV_NOREUSE.patch b/target/linux/generic/backport-6.1/020-v6.3-11-UPSTREAM-mm-support-POSIX_FADV_NOREUSE.patch index 00e5b6e8d513c8..f9c39be920cc85 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-11-UPSTREAM-mm-support-POSIX_FADV_NOREUSE.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-11-UPSTREAM-mm-support-POSIX_FADV_NOREUSE.patch @@ -96,7 +96,7 @@ Signed-off-by: T.J. Mercier --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -600,6 +600,9 @@ static inline bool vma_has_recency(struc +@@ -605,6 +605,9 @@ static inline bool vma_has_recency(struc if (vma->vm_flags & (VM_SEQ_READ | VM_RAND_READ)) return false; diff --git a/target/linux/generic/backport-6.1/020-v6.3-15-UPSTREAM-mm-multi-gen-LRU-section-for-memcg-LRU.patch b/target/linux/generic/backport-6.1/020-v6.3-15-UPSTREAM-mm-multi-gen-LRU-section-for-memcg-LRU.patch index 39552b07c0e8f3..101a0a37572e28 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-15-UPSTREAM-mm-multi-gen-LRU-section-for-memcg-LRU.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-15-UPSTREAM-mm-multi-gen-LRU-section-for-memcg-LRU.patch @@ -87,7 +87,7 @@ Signed-off-by: T.J. Mercier static inline int lru_gen_from_seq(unsigned long seq) { return seq % MAX_NR_GENS; -@@ -309,11 +297,6 @@ static inline bool lru_gen_in_fault(void +@@ -314,11 +302,6 @@ static inline bool lru_gen_in_fault(void return false; } diff --git a/target/linux/generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch b/target/linux/generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch deleted file mode 100644 index 8104ed28df849e..00000000000000 --- a/target/linux/generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch +++ /dev/null @@ -1,229 +0,0 @@ -From ec51fbd1b8a2bca2948dede99c14ec63dc57ff6b Mon Sep 17 00:00:00 2001 -From: Bjørn Mork -Date: Fri, 6 Jan 2023 17:07:38 +0100 -Subject: [PATCH] r8152: add USB device driver for config selection -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Subclassing the generic USB device driver to override the -default configuration selection regardless of matching interface -drivers. - -The r815x family devices expose a vendor specific function which -the r8152 interface driver wants to handle. This is the preferred -device mode. Additionally one or more USB class functions are -usually supported for hosts lacking a vendor specific driver. The -choice is USB configuration based, with one alternate function per -configuration. - -Example device with both NCM and ECM alternate cfgs: - -T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=5000 MxCh= 0 -D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 3 -P: Vendor=0bda ProdID=8156 Rev=31.00 -S: Manufacturer=Realtek -S: Product=USB 10/100/1G/2.5G LAN -S: SerialNumber=001000001 -C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA -I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152 -E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms -E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms -E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=128ms -C: #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA -I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver= -E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms -I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver= -I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver= -E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms -E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms -C: #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=256mA -I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver= -E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms -I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver= -I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver= -E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms -E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms - -A problem with this is that Linux will prefer class functions over -vendor specific functions. Using the above example, Linux defaults -to cfg #2, running the device in a sub-optimal NCM mode. - -Previously we've attempted to work around the problem by -blacklisting the devices in the ECM class driver "cdc_ether", and -matching on the ECM class function in the vendor specific interface -driver. The latter has been used to switch back to the vendor -specific configuration when the driver is probed for a class -function. - -This workaround has several issues; -- class driver blacklists is additional maintanence cruft in an - unrelated driver -- class driver blacklists prevents users from optionally running - the devices in class mode -- each device needs double match entries in the vendor driver -- the initial probing as a class function slows down device - discovery - -Now these issues have become even worse with the introduction of -firmware supporting both NCM and ECM, where NCM ends up as the -default mode in Linux. To use the same workaround, we now have -to blacklist the devices in to two different class drivers and -add yet another match entry to the vendor specific driver. - -This patch implements an alternative workaround strategy - -independent of the interface drivers. It avoids adding a -blacklist to the cdc_ncm driver and will let us remove the -existing blacklist from the cdc_ether driver. - -As an additional bonus, removing the blacklists allow users to -select one of the other device modes if wanted. - -Signed-off-by: Bjørn Mork -Signed-off-by: David S. Miller ---- - drivers/net/usb/r8152.c | 113 ++++++++++++++++++++++++++++------------ - 1 file changed, 81 insertions(+), 32 deletions(-) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -9675,6 +9675,9 @@ static int rtl8152_probe(struct usb_inte - if (version == RTL_VER_UNKNOWN) - return -ENODEV; - -+ if (intf->cur_altsetting->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC) -+ return -ENODEV; -+ - if (!rtl_vendor_mode(intf)) - return -ENODEV; - -@@ -9875,43 +9878,35 @@ static void rtl8152_disconnect(struct us - } - } - --#define REALTEK_USB_DEVICE(vend, prod) { \ -- USB_DEVICE_INTERFACE_CLASS(vend, prod, USB_CLASS_VENDOR_SPEC), \ --}, \ --{ \ -- USB_DEVICE_AND_INTERFACE_INFO(vend, prod, USB_CLASS_COMM, \ -- USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), \ --} - - /* table of devices that work with this driver */ - static const struct usb_device_id rtl8152_table[] = { - /* Realtek */ -- 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), -+ { 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) }, - - /* Microsoft */ -- 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_MICROSOFT, 0x0c5e), -- 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), -+ { 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) }, - {} - }; - -@@ -9931,7 +9926,61 @@ static struct usb_driver rtl8152_driver - .disable_hub_initiated_lpm = 1, - }; - --module_usb_driver(rtl8152_driver); -+static int rtl8152_cfgselector_probe(struct usb_device *udev) -+{ -+ struct usb_host_config *c; -+ int i, num_configs; -+ -+ /* The vendor mode is not always config #1, so to find it out. */ -+ c = udev->config; -+ num_configs = udev->descriptor.bNumConfigurations; -+ for (i = 0; i < num_configs; (i++, c++)) { -+ struct usb_interface_descriptor *desc = NULL; -+ -+ if (!c->desc.bNumInterfaces) -+ continue; -+ desc = &c->intf_cache[0]->altsetting->desc; -+ if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC) -+ break; -+ } -+ -+ if (i == num_configs) -+ return -ENODEV; -+ -+ if (usb_set_configuration(udev, c->desc.bConfigurationValue)) { -+ dev_err(&udev->dev, "Failed to set configuration %d\n", -+ c->desc.bConfigurationValue); -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+static struct usb_device_driver rtl8152_cfgselector_driver = { -+ .name = MODULENAME "-cfgselector", -+ .probe = rtl8152_cfgselector_probe, -+ .id_table = rtl8152_table, -+ .generic_subclass = 1, -+}; -+ -+static int __init rtl8152_driver_init(void) -+{ -+ int ret; -+ -+ ret = usb_register_device_driver(&rtl8152_cfgselector_driver, THIS_MODULE); -+ if (ret) -+ return ret; -+ return usb_register(&rtl8152_driver); -+} -+ -+static void __exit rtl8152_driver_exit(void) -+{ -+ usb_deregister(&rtl8152_driver); -+ usb_deregister_device_driver(&rtl8152_cfgselector_driver); -+} -+ -+module_init(rtl8152_driver_init); -+module_exit(rtl8152_driver_exit); - - MODULE_AUTHOR(DRIVER_AUTHOR); - MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/target/linux/generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch b/target/linux/generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch deleted file mode 100644 index 6476a7fe67e11c..00000000000000 --- a/target/linux/generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0d4cda805a183bbe523f2407edb5c14ade50b841 Mon Sep 17 00:00:00 2001 -From: Hayes Wang -Date: Tue, 17 Jan 2023 11:03:44 +0800 -Subject: [PATCH] r8152: avoid to change cfg for all devices - -The rtl8152_cfgselector_probe() should set the USB configuration to the -vendor mode only for the devices which the driver (r8152) supports. -Otherwise, no driver would be used for such devices. - -Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") -Signed-off-by: Hayes Wang -Reviewed-by: Simon Horman -Signed-off-by: David S. Miller ---- - drivers/net/usb/r8152.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -9556,9 +9556,8 @@ static int rtl_fw_init(struct r8152 *tp) - return 0; - } - --u8 rtl8152_get_version(struct usb_interface *intf) -+static u8 __rtl_get_hw_ver(struct usb_device *udev) - { -- struct usb_device *udev = interface_to_usbdev(intf); - u32 ocp_data = 0; - __le32 *tmp; - u8 version; -@@ -9628,10 +9627,19 @@ u8 rtl8152_get_version(struct usb_interf - break; - default: - version = RTL_VER_UNKNOWN; -- dev_info(&intf->dev, "Unknown version 0x%04x\n", ocp_data); -+ dev_info(&udev->dev, "Unknown version 0x%04x\n", ocp_data); - break; - } - -+ return version; -+} -+ -+u8 rtl8152_get_version(struct usb_interface *intf) -+{ -+ u8 version; -+ -+ version = __rtl_get_hw_ver(interface_to_usbdev(intf)); -+ - dev_dbg(&intf->dev, "Detected version 0x%04x\n", version); - - return version; -@@ -9931,6 +9939,12 @@ static int rtl8152_cfgselector_probe(str - struct usb_host_config *c; - int i, num_configs; - -+ /* Switch the device to vendor mode, if and only if the vendor mode -+ * driver supports it. -+ */ -+ if (__rtl_get_hw_ver(udev) == RTL_VER_UNKNOWN) -+ return 0; -+ - /* The vendor mode is not always config #1, so to find it out. */ - c = udev->config; - num_configs = udev->descriptor.bNumConfigurations; diff --git a/target/linux/generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch b/target/linux/generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch deleted file mode 100644 index 7e647d0cb56ede..00000000000000 --- a/target/linux/generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 95a4c1d617b92cdc4522297741b56e8f6cd01a1e Mon Sep 17 00:00:00 2001 -From: Hayes Wang -Date: Thu, 19 Jan 2023 15:40:42 +0800 -Subject: [PATCH] r8152: remove rtl_vendor_mode function - -After commit ec51fbd1b8a2 ("r8152: add USB device driver for -config selection"), the code about changing USB configuration -in rtl_vendor_mode() wouldn't be run anymore. Therefore, the -function could be removed. - -Signed-off-by: Hayes Wang -Signed-off-by: Jakub Kicinski ---- - drivers/net/usb/r8152.c | 39 +-------------------------------------- - 1 file changed, 1 insertion(+), 38 deletions(-) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -8288,43 +8288,6 @@ static bool rtl_check_vendor_ok(struct u - return true; - } - --static bool rtl_vendor_mode(struct usb_interface *intf) --{ -- struct usb_host_interface *alt = intf->cur_altsetting; -- struct usb_device *udev; -- struct usb_host_config *c; -- int i, num_configs; -- -- if (alt->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC) -- return rtl_check_vendor_ok(intf); -- -- /* The vendor mode is not always config #1, so to find it out. */ -- udev = interface_to_usbdev(intf); -- c = udev->config; -- num_configs = udev->descriptor.bNumConfigurations; -- if (num_configs < 2) -- return false; -- -- for (i = 0; i < num_configs; (i++, c++)) { -- struct usb_interface_descriptor *desc = NULL; -- -- if (c->desc.bNumInterfaces > 0) -- desc = &c->intf_cache[0]->altsetting->desc; -- else -- continue; -- -- if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC) { -- usb_driver_set_configuration(udev, c->desc.bConfigurationValue); -- break; -- } -- } -- -- if (i == num_configs) -- dev_err(&intf->dev, "Unexpected Device\n"); -- -- return false; --} -- - static int rtl8152_pre_reset(struct usb_interface *intf) - { - struct r8152 *tp = usb_get_intfdata(intf); -@@ -9686,7 +9649,7 @@ static int rtl8152_probe(struct usb_inte - if (intf->cur_altsetting->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC) - return -ENODEV; - -- if (!rtl_vendor_mode(intf)) -+ if (!rtl_check_vendor_ok(intf)) - return -ENODEV; - - usb_reset_device(udev); diff --git a/target/linux/generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch b/target/linux/generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch deleted file mode 100644 index cd245f9d2e8ffc..00000000000000 --- a/target/linux/generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0fbd79c01a9a657348f7032df70c57a406468c86 Mon Sep 17 00:00:00 2001 -From: Hayes Wang -Date: Tue, 2 May 2023 11:36:27 +0800 -Subject: [PATCH] r8152: fix the autosuspend doesn't work - -Set supports_autosuspend = 1 for the rtl8152_cfgselector_driver. - -Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") -Signed-off-by: Hayes Wang -Signed-off-by: David S. Miller ---- - drivers/net/usb/r8152.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -9939,6 +9939,7 @@ static struct usb_device_driver rtl8152_ - .probe = rtl8152_cfgselector_probe, - .id_table = rtl8152_table, - .generic_subclass = 1, -+ .supports_autosuspend = 1, - }; - - static int __init rtl8152_driver_init(void) diff --git a/target/linux/generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch b/target/linux/generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch deleted file mode 100644 index e4375963675bcf..00000000000000 --- a/target/linux/generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 72f93a3136ee18fd59fa6579f84c07e93424681e Mon Sep 17 00:00:00 2001 -From: Antonio Napolitano -Date: Sat, 26 Aug 2023 01:05:50 +0200 -Subject: [PATCH] r8152: add vendor/device ID pair for D-Link DUB-E250 - -The D-Link DUB-E250 is an RTL8156 based 2.5G Ethernet controller. - -Add the vendor and product ID values to the driver. This makes Ethernet -work with the adapter. - -Signed-off-by: Antonio Napolitano -Link: https://lore.kernel.org/r/CV200KJEEUPC.WPKAHXCQJ05I@mercurius -Signed-off-by: Jakub Kicinski ---- - drivers/net/usb/r8152.c | 1 + - include/linux/usb/r8152.h | 1 + - 2 files changed, 2 insertions(+) - - ---- a/include/linux/usb/r8152.h -+++ b/include/linux/usb/r8152.h -@@ -29,6 +29,7 @@ - #define VENDOR_ID_LINKSYS 0x13b1 - #define VENDOR_ID_NVIDIA 0x0955 - #define VENDOR_ID_TPLINK 0x2357 -+#define VENDOR_ID_DLINK 0x2001 - - #if IS_REACHABLE(CONFIG_USB_RTL8152) - extern u8 rtl8152_get_version(struct usb_interface *intf); ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -9860,6 +9860,7 @@ static const struct usb_device_id rtl815 - { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, - { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, - { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, -+ { USB_DEVICE(VENDOR_ID_DLINK, 0xb301) }, - {} - }; - diff --git a/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch b/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch index 222aa3f779c4b4..6df071c9b83f20 100644 --- a/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch +++ b/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch @@ -36,7 +36,7 @@ Signed-off-by: Christian Marangi __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue)); -@@ -5476,12 +5477,13 @@ static int stmmac_napi_poll_tx(struct na +@@ -5473,12 +5474,13 @@ static int stmmac_napi_poll_tx(struct na struct stmmac_channel *ch = container_of(napi, struct stmmac_channel, tx_napi); struct stmmac_priv *priv = ch->priv_data; @@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi work_done = min(work_done, budget); if (work_done < budget && napi_complete_done(napi, work_done)) { -@@ -5492,6 +5494,10 @@ static int stmmac_napi_poll_tx(struct na +@@ -5489,6 +5491,10 @@ static int stmmac_napi_poll_tx(struct na spin_unlock_irqrestore(&ch->lock, flags); } @@ -62,7 +62,7 @@ Signed-off-by: Christian Marangi return work_done; } -@@ -5501,11 +5507,12 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5498,11 +5504,12 @@ static int stmmac_napi_poll_rxtx(struct container_of(napi, struct stmmac_channel, rxtx_napi); struct stmmac_priv *priv = ch->priv_data; int rx_done, tx_done, rxtx_done; @@ -76,7 +76,7 @@ Signed-off-by: Christian Marangi tx_done = min(tx_done, budget); rx_done = stmmac_rx_zc(priv, budget, chan); -@@ -5530,6 +5537,10 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5527,6 +5534,10 @@ static int stmmac_napi_poll_rxtx(struct spin_unlock_irqrestore(&ch->lock, flags); }