Revert "usb: acpi: fix device link removal"

This reverts commit 7cb8750160 which is
commit 3b18405763c1ebb1efc15feef5563c9cdb2cc3a7 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Id0ef7b3e63d5293160808ade4eb705d2b9e44b5e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-07-13 12:26:39 +00:00
parent 9222a6a6c0
commit 50d296188b
3 changed files with 1 additions and 8 deletions

View File

@@ -2336,9 +2336,6 @@ void usb_disconnect(struct usb_device **pdev)
usb_remove_ep_devs(&udev->ep0);
usb_unlock_device(udev);
if (udev->usb4_link)
device_link_del(udev->usb4_link);
/* Unregister the device. The device driver is responsible
* for de-configuring the device and invoking the remove-device
* notifier chain (used by usbfs and possibly others).

View File

@@ -157,7 +157,7 @@ EXPORT_SYMBOL_GPL(usb_acpi_set_power_state);
*/
static int usb_acpi_add_usb4_devlink(struct usb_device *udev)
{
struct device_link *link;
const struct device_link *link;
struct usb_port *port_dev;
struct usb_hub *hub;
@@ -188,8 +188,6 @@ static int usb_acpi_add_usb4_devlink(struct usb_device *udev)
dev_dbg(&port_dev->dev, "Created device link from %s to %s\n",
dev_name(&port_dev->child->dev), dev_name(nhi_fwnode->dev));
udev->usb4_link = link;
return 0;
}

View File

@@ -628,7 +628,6 @@ struct usb3_lpm_parameters {
* FIXME -- complete doc
* @authenticated: Crypto authentication passed
* @tunnel_mode: Connection native or tunneled over USB4
* @usb4_link: device link to the USB4 host interface
* @lpm_capable: device supports LPM
* @lpm_devinit_allow: Allow USB3 device initiated LPM, exit latency is in range
* @usb2_hw_lpm_capable: device can perform USB2 hardware LPM
@@ -739,7 +738,6 @@ struct usb_device {
unsigned reset_resume:1;
unsigned port_is_suspended:1;
enum usb_link_tunnel_mode tunnel_mode;
struct device_link *usb4_link;
int slot_id;
struct usb2_lpm_parameters l1_params;